Reputation: 9580
I am getting this error
"Error 19 Class 'LegacyRouteHandler' must implement 'Function GetHttpHandler(requestContext As RequestContext) As IHttpHandler' for interface 'System.Web.Routing.IRouteHandler'."
from this code:
Public Class LegacyRouteHandler
Implements IRouteHandler
Public Function GetHttpHandler(requestContext As RequestContext) As IHttpHandler
Return New LegacyHandler(requestContext)
End Function
End Class
I am clearly implementing GetHttpHandler
, any ideas why I am getting this error?
Upvotes: 5
Views: 406
Reputation: 26883
You need to add an Implements
clause after the function prototype.
...) As IHttpHandler Implements IRouteHandler.GetHttpHandler
' ^
VB.NET doesn't automatically wire up functions to their interface definitions like C# does.
Upvotes: 7