I have a class in C# defined as
public class Square{
public int Count{ get; set; }
}
I want to set in Count properties the amount of calls it has.
I set in the constructor
public Square()
{
Count+= 1;
}
But it is always 0, when I call it.
How can I keep the value for next calls.?
Thanks
public static int Count {get; private set;}