When trying to determine the Architecture of an OS, I ran across IntPtr.

From reading the documentation, I saw this:
The IntPtr type is designed to be an integer whose size is platform-specific. That is, an instance of this type is expected to be 32-bits on 32-bit hardware and operating systems, and 64-bits on 64-bit hardware and operating systems.
Since the size of IntPtr is intended to be the size of the architecture, would it be feasible to test the size and determine the OS by that? Or is there a better way?

I was thinking there might also be a way via WMI, but I don't want to use that for compatibility reason.