how do i do the VB.NET
VB Code:
WithEvents mClass as new Class
in C#?
and how do i declare events? and raise them?
Printable View
how do i do the VB.NET
VB Code:
WithEvents mClass as new Class
in C#?
and how do i declare events? and raise them?
read up on Delegates
Declaring and using events in C# is a little more involved than in VB.NET. Listen to what Kovan said and read up on Delegates.
Here is an example I did that I posted in the Codebank of VBWorld.com
http://216.26.168.92/vbworld/code.aspx?id=131
ah k tks =)
what is the difference of a delegate and an event? ...
i didnt get with hellswraith's tuturial the real point of a delegate..i just see 50 lines of code just for a simple msg =\
An event is a type of delegate. You can think of a delegate as a type-safe function pointer. You can use these for dynamtic run-time method invokation and callbacks. Objects use events to notify other objects.Quote:
what is the difference of a delegate and an event? ...
hmmmmmmmm