{ Dictionary<string, string> _names = new Dictionary<string, string> {{"Iliescu", "Ion"}, {"Basescu", "Traian"} , {null, "Dorel"}}; //ArgumentNullException Console.WriteLine(_names[null]); // ArgumentNullException Console.WriteLine(_names["Geoana"]); //KeyNotFoundException }
Niciun comentariu:
Trimiteți un comentariu