The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
How can I catch events of the object if do like ,f.e:
class MyClass{
Event1();
Event2();
.....
}
After declaration of MyClass write anywhere in the Main function
public static void Main(){
MyClass c = new MyClass();
MyClass c_new;
c_new = c; //?????
/*After this catch events which arrive to object 'c' in the object 'c_new'
How can I do this, if this is possible in general?*/
}
RPRamesh Praveen Syncfusion Team July 9, 2003 07:53 AM UTC
Actually c and c_new are referring to the same object. And to listen to events fired by this object, you do this:
c.Event1 += new EventHandler(this.MyHandler);
//Also define MyHandler in your class:
private void MyHandler(object sender, EventArgs e)
{
...
}
-Praveen