Error exposing event througt interface

Posted by carlos on Stack Overflow See other posts from Stack Overflow or by carlos
Published on 2010-05-19T20:29:09Z Indexed on 2010/05/19 21:00 UTC
Read the original article Hit count: 155

Filed under:
|

I have this interface

Interface IProDataSource

    Delegate Sub DstartingHandler(ByVal sender As Object, ByVal e As EventArgs)
    Event starting_Sinc As DstartingHandler

End Interface

Trying to use the intarce like this

Public Class DataSource : Implements IProDataSource

    Public Event starting_Sinc As DstartingHandler Implements IProDataSource.starting_Sinc
    Public Delegate Sub DstartingHandler(ByVal sender As Object, ByVal e As EventArgs)

End Class

Gives me the next error

Event 'starting_Sinc' cannot implement event 'starting_Sinc' on interface 'IProDataSource' because their delegate types 'DstartingHandler' and 'IProDataSource.DstartingHandler' do not match.

© Stack Overflow or respective owner

Related posts about vb.net

Related posts about .NET