I have dictionary like this :
"parameters": [ { "name": "a", "value": "b" }, { "name": "c", "value": "d" } ], Have defined the dictionary like this :
Dictionary<string, atypeModel> where atypeModel is like this :
public class atypeModel { public string Name { get; set; } public string Value { get; set; } } now , what Im not getting is how to retrieve the value by key . I did below :
var myKey = types.FirstOrDefault(a => a.Value == "b").Key; but it is giving below error :
Operator '==' cannot be applied to operands of type 'atypeModel' and 'string '
please suggest