I\'m trying to learn custom events and I have tried to create one but seems like I have a problem
I have created a Form, static class and custom event. What I\'m tr
You haven't created an event. To do that write:
public event EventHandler
Then, you can call Progress from within the class where it was declared like normal function or delegate:
Progress(this, new Progress("some status"));
So, if you want to report progress in TestClass, the event should be in there too and it should be also static. You can the subscribe to it from your form like this:
TestClass.Progress += SetStatus;
Also, you should probably rename Progress to ProgressEventArgs, so that it's clear what it is.