I have a Class A...in it's constructor...I am assigning an anonymous function to Object_B's eventHandler.
How do I remove (unsubscribe) that from Dispose method of class A ?
Any help would be appreciated ! Thanks
Public Class A
{
public A()
{
B_Object.DataLoaded += (sender, e) =>
{
Line 1
Line 2
Line 3
Line 4
};
}
Public override void Dispose()
{
// How do I unsubscribe the above subscribed anonymous function ?
}
}