|
-
July 7th, 2002, 02:31 PM
#1
Event declaration and firing
In VB I need to write 2 lines in Class to declare and fire event. In client (form for instance) I need to create an object with events from my class and write something in event procedure (3 more lines of code). Something like that:
'in class
<vbcode>
Public Event myEvent
'in some procedure
RaiseEvent myEvent
'in form
Private WithEvents obj As myClass
obj=New myClass
Private Sub obj_myEvent()
MessageBox.Show("Event fired")
End Sub
</vbcode>
How do I do the same stuff in C#? Unfortunately I cannot find any simple sample in my books.
Thank you
Vlad
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|