← Back to Question List
C# Code Walkthrough #46
A Simple Class
📄 Code
Read carefully — what does this print?1var c = new Counter();2c.Inc();3c.Inc();4c.Inc();5Console.WriteLine(c.Count);67class Counter8{9 public int Count = 0;10 public void Inc() => Count++;11}