Is there a way I can tel开发者_运维问答l what framework I've been using as I need to access machine.config?
Framework or Framework 64 under C:\Windows\Microsoft.NET\ directory both have the file.
have a look at this article: If you are using .NET 4, it has two properties in the Environment class, Is64BitOperatingSystem and Is64BitProcess. give them a try.
and have a look on this article, it's really useful: How to detect programmatically whether you are running on 64-bit Windows
From within the code? In C# 4.0 Environment.Is64BitProcess
, in < 4.0 IntPtr.Size
. And read How to detect Windows 64-bit platform with .NET?
精彩评论