C Sharp (C#) - Classes and Objects
What will be the output of this C# code?
class Counter {
private int count = 0;
public void Increment() { count++; }
public int GetCount() { return count; }
}
var c = new Counter();
c.Increment();
c.Increment();
Console.WriteLine(c.GetCount());