Q&A

Q1:Is it possible to create custom events for an object?
A1: You can create custom events for objects created from your custom classes (see Hour 17, “Designing Objects with Classes”), but you cannot create custom events for existing C# objects such as forms and controls (without using some seriously advanced object-oriented techniques that are beyond the scope of this book).
Q2:Is it possible for objects that don't have an interface to support events?
A2: Yes. However, to use the events of such an object, the object variable must be dimensioned a special way or the events aren't available. This gets a little tricky and is beyond the scope of this book. If you have an object in code that supports events, look in Help for the keyword WithEvents for information on how to use such events.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.52.208