By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,693 Members | 1,424 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,693 IT Pros & Developers. It's quick & easy.

Convert Event from C# to VB.Net

P: n/a
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

Husam
Feb 13 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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" <Hu***@discussions.microsoft.com> escribió en el mensaje
news:64**********************************@microsof t.com...
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

Husam

Feb 13 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.