I have a problem. I’m trying to subscribe to an event in static void main, but i get the error “An object reference is required for the non-static field,method etc”
Here is part of the code :
public static void Main(string[] args)
{
...
Factorial Fact = new Factorial();
Fact.Progression += new Factorial.ProgressEventHandler(Progress);
...
}
How do I get rid of the error?
Thanks in advance
Try doing it inline.