private void AddElectors() { while (true) { Console.WriteLine("How many fake, russian electors would you like to create?"); Console.WriteLine("(this will create target amount of electors with PESEL starting from 1000++)"); string userInput = Console.ReadLine(); if (int.TryParse(userInput, out int amount)) { webApiService.InitializeListOfElectors(amount); break; } else { Console.WriteLine("incorrect format"); } } }