Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VB AddHandler --> C# equiv.
Message
 
To
20/07/2004 21:02:48
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00926398
Message ID:
00926401
Views:
12
>What is the equivalent in C# for the following VB.NET statements? o is a TextBox object passed into the method:
AddHandler o.Validating, New System.ComponentModel.CancelEventHandler(AddressOf OnValidating)

Answer 1
AddHandler o.Validating, AddressOf Me.RoutineName
>Answering #1 certainly answers this one, so I only need comments if you feel its necessary:
RemoveHandler o.Validating, New System.ComponentModel.CancelEventHandler(AddressOf OnValidating)

Answer 2
RemoveHandler o.Validating, AddressOf Me.RoutineName
Hope that helps...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform