How to make Event visible?
        Posted  
        
            by eflles
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by eflles
        
        
        
        Published on 2010-06-15T05:41:18Z
        Indexed on 
            2010/06/15
            5:42 UTC
        
        
        Read the original article
        Hit count: 276
        
Inside a Silverlight library project I have a public event, which is not visible for other classes. How can I make the event visible?
When I try the following code, I can not locate the event in the "ReceivingClass".
.dll - file:
Public Class MyClass
    Public Event MyEvent(ByVal sender As Object, ByVal e As EventArgs)
    Public Sub OnStart()
        RaiseEvent MyEvent(Me, new EventArgs)
    End Sub
End Class
Silverlight app:
Imports MyClass
Public Class ReceivingClass
    Public Sub New()
        Dim myClass As new MyClass
        AddHandler myClass.MyEvent, AddressOf Me.EventHandler
    End Sub
    Private Sub EventHandler(ByVal sender As Object, ByVal e As EventArgs)
      'Handle Event
    End Sub
End Class
© Stack Overflow or respective owner