← Back to Question List
C# Code Walkthrough #25
Static Field Persists Across Calls
📄 Code
Read carefully — what does this print?1Console.WriteLine($"{Counter.Next()} {Counter.Next()} {Counter.Next()}");23class Counter4{5 static int total = 0;6 public static int Next() => ++total;7}