Programming notes

Ciclare una collezione generics


Per ciclare una collezione di "Generics" per esempio: Dictionary<string, int> mVisibleCol = new Dictionary<string, int>(); Non si usa pių il "DictionaryEntry" ma bensė l'oggetto "KeyValuePair" come nell'esempio che segue: foreach( KeyValuePair<string, string> kvp in mVisibleCol ){   Console.WriteLine("Key = {0}, Value = {1}",    kvp.Key, kvp.Value.ToString());}