using System; using System.Threading; namespace _2 { class Program { static void f() { int x = 0; x++; } static void Main(string[] args) { int threadCounter = 0; while(true) { Thread t1 = new Thread(f); threadCounter++; t1.Start(); Console.WriteLine("Number of threads: " + threadCounter); } Console.ReadLine(); } } }