C# Browscap Version
C# Browscap Version
I made a little test with a first C# parser as ConsoleApplication, witch uses Windows native methods, i think C# has no own INI class (if someone knows a better way, please tell us):
 For loading the 48048 sections in an array and sort them by length (descending) it takes 796 ms (I think that's ok, because the loading should only happen once), on a search of "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0" the match [Mozilla/5.0 (Windows NT 6.1*WOW64) Gecko/* Firefox/28.0*] was found in 811ms (I think that's bad)
 to get the values and copy them to a NameValueCollection it takes 203 ms (that's very bad)
I think the only way to do that with C# is to write an INI-File Class for C# and also write a little function as replacement for the regular expressions.
The following version is only my test version, not all necessary measures for the proper processing were implemented!
ToDo / known issues:
 1.	 Replace the RegExp method with a faster like in my free pascal version
2.	 Replace the kernel32 implementation of ini-file methods by a native C# class
3.	 Check for match without comparing numbers
 browscap.cs 
Anwendungbeispiel:
 Program.cs 
Output: 
load 57907 sections in 796 mssearch : [Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0]Mozilla/5.0 (*Windows NT 6.1*WOW64*) Gecko* Firefox/28.0*:^Mozilla/50 .*Windows NT 61.*WOW64.* Gecko.* Firefox/280.*$find match: [Mozilla/5.0 (*Windows NT 6.1*WOW64*) Gecko* Firefox/28.0*] in 811 msget values: 203 msBrowser_Bits=32Platform=Win7Platform_Version=6.1Platform_Description=Windows 7Platform_Bits=64Platform_Maker=Microsoft CorporationWin32=falseWin64=trueDevice_Name=Windows DesktopDevice_Code_Name=Windows DesktopComment=Firefox 28.0Browser=FirefoxBrowser_Type=BrowserBrowser_Maker=Mozilla FoundationVersion=28.0MajorVer=28Frames=trueIFrames=trueTables=trueCookies=trueJavaScript=trueJavaApplets=trueCssVersion=3Device_Maker=VariousDevice_Type=DesktopDevice_Pointing_Method=mouseRenderingEngine_Name=GeckoRenderingEngine_Version=28.0RenderingEngine_Description=For Firefox, Camino, K-Meleon, SeaMonkey, Netscape, and other Gecko-based browsers.RenderingEngine_Maker=Mozilla FoundationBrowser_Modus=unknownMinorVer=0Alpha=falseBeta=falseWin16=falseBackgroundSounds=falseVBScript=falseActiveXControls=falseisMobileDevice=falseisTablet=falseisSyndicationReader=falseCrawler=falseAolVersion=0Device_Brand_Name=unknown