Razor89
Member
- Joined
- Dec 15, 2004
- Messages
- 12
I dont know if this should have gone in the general area or what but since
I use VB.NET and I have no clue if C# supports events and all that stuff
I will ask my question here.
Now for my question.
I have seen some events in my coding experience that have the following
parameters for example:
Public Event MyEvent(Byval Cancel As Boolean) Handles Whatever.MyEvent
Now in events like these if you set Cancel to TRUE, whatever should happen
after the event is raised will stop. How do I do this in my own classes?
I tried playing with ByRef and all that stuff to pass a variable from inside
my sub that raises the event and then checking the value of that variable
after the event has been raised, but no luck.
Thanks for any input!
I use VB.NET and I have no clue if C# supports events and all that stuff
I will ask my question here.
Now for my question.
I have seen some events in my coding experience that have the following
parameters for example:
Public Event MyEvent(Byval Cancel As Boolean) Handles Whatever.MyEvent
Now in events like these if you set Cancel to TRUE, whatever should happen
after the event is raised will stop. How do I do this in my own classes?
I tried playing with ByRef and all that stuff to pass a variable from inside
my sub that raises the event and then checking the value of that variable
after the event has been raised, but no luck.
Thanks for any input!