1

Is there a way I can tell 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.

bluish
  • 24,718
  • 26
  • 114
  • 174
TeaDrinkingGeek
  • 1,917
  • 5
  • 31
  • 51

2 Answers2

2

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?

Community
  • 1
  • 1
xanatos
  • 106,283
  • 12
  • 188
  • 265
2

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

Mohammed Swillam
  • 8,822
  • 3
  • 34
  • 45