I have an IDictionary object , my question is how I can read data by key? It looks easier question but there is no method (even similiar one is not found) like TryGetValue . Only Contains method looks available, but I want to get value of data by key.
Am I missing stg?
Edit: As detail
I am trying to get values from:
var browser = System.Web.HttpContext.Current.Request.Browser;
I want to get value from the IDictionary
object(named Capabilities
) which is defined inside System.Web.HttpContext.Current.Request.Browser
:
public IDictionary Capabilities { get; set; }
When I try to read value from this object, I can not.
You can easily write an extension method for
HttpBrowserCapabilities
:Or for
IDictionary
: