using System.Collections;
static ArrayList torpek = new ArrayList();
Console.Write("A törpe neve: ");
torpek.Add(Console.ReadLine());
Console.Write("A törpe kora: ");
torpek.Add(Convert.ToInt32(Console.ReadLine()));
foreach (string a in torpek) Console.WriteLine(torpek.Sort());
Console.WriteLine("1: Új törpe");
Console.WriteLine("2: Törpe törlése");
Console.WriteLine("0: Kilépés");
Console.Write("A választott menüpont száma: ");
choice = Convert.ToInt32(Console.ReadLine());
case 1: feltoltes(); break;
case 2: foreach (string a in torpek) Console.WriteLine(a); break;
public static void Main()