Since "IntPtr.Size" checks the size of int's pointer based on the current process, is it the same as "Environment.Is64BitProcess"?
If yes, why can I only see "return true/false" (if you use dnSpy to refactor the code from "System")?
If not, any differences between them? Where to use what?
In modern runtimes (net core) Is64BitProcess
is defined through IntPtr.Size == 8
. See source
You see false
because you're inspecting 32-bit mscorlib. 64-bit is located in C:\Windows\Microsoft.NET\Framework64\v4.0.30319
and always returns true