D
Dave
I have the following code. I am trying to handle the event in the C#
code in VB.net. However whenever the event tries to get called, the
MyEvent method is always null..... any ideas?
VB.NET
dim xml as new MyClass
AddHandler xml.MyEvent, New EventHandler(AddressOf xmlEvent)
C#
public class XMLHandler
{
public event EventHandler MyEvent;
protected virtual void OnRaiseMe(object o, EventArgs e)
{
if (MyEvent!=null)
MyEvent(this, e); //Doesn't happen as MyEvent is null
}
}
code in VB.net. However whenever the event tries to get called, the
MyEvent method is always null..... any ideas?
VB.NET
dim xml as new MyClass
AddHandler xml.MyEvent, New EventHandler(AddressOf xmlEvent)
C#
public class XMLHandler
{
public event EventHandler MyEvent;
protected virtual void OnRaiseMe(object o, EventArgs e)
{
if (MyEvent!=null)
MyEvent(this, e); //Doesn't happen as MyEvent is null
}
}