vendredi 30 janvier 2015

dictionary.ContainsKey(input ) ? int value = dictionary[input] : "Not Found" ;

Why this does not work?



dictionary.ContainsKey(input ) ? int value = dictionary[input] : "Not Found";


But it works this way:



if(dictionary.ContainsKey (input)){int values =dictionary[input];}

Aucun commentaire:

Enregistrer un commentaire