Try to use this:
dim kvp as KeyValuePair
kvp = list.Find(p=>p.Value = value))
if kvp = null then return "" else return kvp.Key
One user told me to modify it in this way:
dim kvp = list.Find(Function(e) e.Value = value)
If kvp Is Nothing Then Return "" Else Return kvp.Key
Sorry if this code has some error, but I cannot try and I usually write in C#.
So my code (in C#) would be:
KeyValuePair kvp = list.Find(p=>p.Value == value));
return kvp == null ? "" : kvp.Key;
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…