.NET lib for interpreting user agent strings

Mr. Flibble picture Mr. Flibble · Sep 8, 2010 · Viewed 17.8k times · Source

Are there and .NET libs out there that will interpret stored user agent strings and give you a nice strongly typed object with the contained information?

Answer

Umar Topia picture Umar Topia · Feb 10, 2013
        var browserCapabilities = new HttpBrowserCapabilities
        {
            Capabilities = new Hashtable { { string.Empty, userAgent } }
        };

        var capabilitiesFactory = new BrowserCapabilitiesFactory();

        capabilitiesFactory.ConfigureBrowserCapabilities(new NameValueCollection(), browserCapabilities);

        return browserCapabilities;