[Solved] How to use unassigned local variable? [closed]
An example of how you could do this is: using System; using System.Collections.Generic; public class Program { public static void Main() { bool read = true; List<int> list = new List<int>(); do{ string input = Console.ReadLine(); int x = 0; if(input == “start”) { read = false; } else if(int.TryParse(input, out x)) { list.Add(x); } … Read more