How to detect Windows 64-bit platform with .NET?

In a .NET 2.0 C# application I use the following code to detect the operating system platform: string os_platform = System.Environment.OSVersion.Platform.ToString(); This returns “Win32NT”. The problem is that it returns “Win32NT” even when running on Windows Vista 64-bit. Is there any other method to know the correct platform (32 or 64 bit)? Note that it should also … Read more

Detecting a mobile browser

I’m looking for a function which return boolean value if user has mobile browser or not. I know that I can use navigator.userAgent and write that function by using regex, but user-agents are too various for different platforms. I doubt that match all possible devices would be easy, and I think this problem has been … Read more