I need to transform the following in VB.NET from C# (.NET 4)
class XXX:
public event EventHandler ContentScaleChanged;
if (otherXXX.ContentScaleChanged != null)
{
otherXXX.ContentScaleChanged(c, EventArgs.Empty);
}
please help
EDIT:
I cant’ do RaiseEvent ContentScaleChanged(c, EventArgs.Empty), because I need to raise that event on the otherXXX instance…
Edit: My mistake
RaiseEvent does a null check
If you want to invoke this event handler from another location then the class the event was created in then you need a method to raise the event: