In the case where Dictionary<object, object>
myDictionary
happens to contain a single item, what is the best way to retrieve the value object (if I don't care about the key) ?
if (myDictionary.Count == 1)
{
// Doesn't work
object obj = myDictionary.Values[0];
}
Thanks