Get key by his value on Dict C#

109

Get key by his value on Dict C# -

var myKey = myDict.FirstOrDefault(x => x.Value == "myValue").Key;
// return the first key finded in the dict associated to this value

Comments

Submit
0 Comments