I have dictionary created as
Dictionary<string, string> delta = new dictionary<string, string>();
delta.Add("A", "One");
delta.Add("B", "Two");
delta.Add("C", "Three");
I wanted to retrieve value based on the value passed as key
public string GetValuefromdictionary(string roll. Dictionary<string, string> delta)
{
string rollValue;
return rollValue = delta
.Where(d => d.Key.Contains(roll))
.Select(d => d.Value)
.ToString();
}
however I am seeing it doesn't return me the string and I get like this
System.Linq.Enumerable+WhereSelectEnumerableIterator``2[System.Collections.Generic.KeyValuePair``2[System.String,System.String],System.String]
any help