|
-
April 24th, 2009, 02:09 AM
#4
Re: Overloading event parameters
Creating the instance of EventParameters can be "ecapsulated" in each of everloaded RaiseEvent method. And I thing that it is the right way to have two types of EventParameters, one carrying String and one carrying XmlDocument.
Only other way I can imagine is to declare the delegate like:
Code:
private delegate void MyEventDelegate(object obj, int num, int pos);
OR
You can avoid using events and implement some kind of observer pattern and just invoke the appropriate overloaded method on the registered interface implementation.
It is C#, it needs to be used in OOP way ;-)
- Make it run.
- Make it right.
- Make it fast.
Don't hesitate to rate my post. 
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
|