all groups > vb.net > february 2006 >
You're in the

vb.net

group:

Convert Event from C# to VB.Net



Convert Event from C# to VB.Net Husam
2/12/2006 9:26:26 PM
vb.net: Hi EveryBody:

I have the following event written by C# And I want some body help me or
advise me in how can I write it in Vb.Net, also if there is any refreance
that I have to add please tell me :

public event EventHandler ReadyStateComplete {
add {
Events.AddHandler(_readyStateCompleteEvent, value);
}
remove {
Events.RemoveHandler(_readyStateCompleteEvent, value);
}
}
any help will be completlly appreciated

regard's

Re: Convert Event from C# to VB.Net Carlos J. Quintero [VB MVP]
2/13/2006 12:00:00 AM
Hi Husam,

VB.NET 2002/2003 does not support custom events but VB.NET 2005 does, so
check the help docs about "Custom Event":

Public Custom Event ReadyStateComplete As EventHandler

AddHandler(ByVal value As EventHandler)
...
End AddHandler

RemoveHandler(ByVal value As EventHandler)
...
End RemoveHandler

RaiseEvent(ByVal sender As Object, ByVal e As System.EventArgs)
...
End RaiseEvent

End Event

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com



"Husam" <Husam@discussions.microsoft.com> escribió en el mensaje
news:6429B9E2-2705-4A36-8080-5A1254567600@microsoft.com...
[quoted text, click to view]

AddThis Social Bookmark Button