TeaDrinkingGeek
TeaDrinkingGeek

Reputation: 2023

Framework or Framework 64?

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.

Upvotes: 1

Views: 3213

Answers (2)

xanatos
xanatos

Reputation: 111870

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?

Upvotes: 2

Mohammed Swillam
Mohammed Swillam

Reputation: 9242

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

Upvotes: 2

Related Questions