functions in one Delegate by using something like:
public
void add_MyEventHandler( MyEventHandler listener){
if (MyEventHandler != null)
{
MyEventHandler = (MyEventHandler)System.Delegate.Combine(MyEventHandler, listener);
}
else
{
MyEventHandler = listener;
}
}
i.add_MyEventHandler(
new MyEventHandler(this.f1));i.add_MyEventHandler(new MyEventHandler(this.f2));
when MyEventHandler is invoked, both functions are triggered
ie: MyEventHandler.Invoke();
I was wondering if there is a way to only invoke a particular function rather than
all of them that may have been added with the Combine method, and is there a way to get at the name of the function
thanks

Delegate Functions
chris12345
Our Instant J# VB to J# converter will translate this for you.
Download the Demo at www.tangiblesoftwaresolutions.com
David Anton
www.tangiblesoftwaresolutions.com
Home of:
Clear VB: Cleans up outdated VB.NET code
Instant C#: Converts from VB.NET to C#
Instant VB: Converts from C# to VB.NET
Instant J#: Converts from VB.NET to J#
sarsani
That's why there is no way for one class to know who the registered event handlers are or the names of their event handling methods.
Here is a very good introduction to delegates: http://www.thecodeproject.com/csharp/delegate_bedtime.asp
dbProg
http://msdn.microsoft.com/library/default.asp url=/library/en-us/dnwinforms/html/printwinforms.asp
trouble is it is wrtten in VB - so I wanted something in J# - I've got somehing working now by adding the functions into an array instead of using Combine and then I maintain a separtate "FunctonID" list that is maintained in sync with the
Funtion array, then I just pass the FunctionID that I want to invoke.
anyway I've got around that problem now
thanks