Hi,
I have a delegate which points to 3 different methods. These methods are added in its invocation list.
What is second method throws an exception??? I still need to execute the third method.
I think one alternative is below mentioned code
public delegate void MethodHandler();
A oa = new A();
B ob = new B();
C oc = new C();
D od = new D();
MethodHandler M = oa.TestM;
M += ob.TestM;
M += oc.TestM;
M += od.TestM;
foreach (Delegate item in M.GetInvocationList())
{
try
{
item.DynamicInvoke(null);
}
catch
{
}
}
Is there any other alternative to avoid this?