+ 3
It is possible to make associative arrays, or maps, or dictionaries in C#?
2 Antworten
+ 3
Thanks .. I already made an example ..
Dictionary<int, string> d = new Dictionary<int, string>();
d.Add (0, "One");
d.Add (3, "Three");
d.Add (6, "Six");
d.Add (9, "Nine");
foreach (var elem in d) {
Console.Write(elem.Key + " ");
Console.WriteLine(elem.Value);
}
https://code.sololearn.com/cMHxPsCHgNVb
+ 2
Yes, check the examples
https://www.dotnetperls.com/dictionary