Just pass the instance variable to the shared method. Here's a working
example:
Module Module1
Sub Main()
Dim c As New YourClass
YourClass.ChangeName(c, "funny pants")
Console.WriteLine(c.Name)
Console.Read()
End Sub
End Module
Public Class YourClass
Private m_Name As String
Public Shared Sub ChangeName(ByVal c As YourClass, ByVal newName As
String)
c.Name = newName
End Sub
Public Property Name() As String
Get
Return m_Name
End Get
Set(ByVal value As String)
m_Name = value
End Set
End Property
End Class
Thanks,
Seth Rowe
Pon wrote:
Hi everybody,
Simple question : Inside a class that has a shared method, how to raise an
event on a given instance of this class from the shared method ?