Hashtafla er hér óþarfi, nóg að hafa array af integer tölum með 6 “fylkjum?”. Líkt og: using System; using System.Text; namespace Dices { class Program { static void Main(string[] args) { int rollCount = 1000000; int[] results = new int[6] { 0, 0, 0, 0, 0, 0 }; for (int i = 0; i < rollCount; i++) { Random rnd = new Random(i * System.DateTime.Now.Millisecond); int number = rnd.Next(1, 7); results[number-1]++; } System.Console.WriteLine(String.Format("Niðurstöður úr {0}...