Click here to Skip to main content
15,867,308 members
Articles / Programming Languages / C#
Alternative
Tip/Trick

32-Bit or 64-bit OS ??

Rate me:
Please Sign up or sign in to vote.
1.00/5 (3 votes)
20 Sep 2010CPOL 11.6K   2   4
To check 64Bit Operating system in VB.NET,Public Shared Function is64BitOPeratinSystem() As Boolean Return (Marshal.SizeOf(IntPtr.Zero) = 8)End Function
To check 64Bit Operating system in VB.NET,

Public Shared Function is64BitOPeratinSystem() As Boolean
    Return (Marshal.SizeOf(IntPtr.Zero) = 8)
End Function

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Engineer
Egypt Egypt
Oil & Gas Engineer
C# & VB.net
Coding For Fun Only

Comments and Discussions

 
GeneralReason for my vote of 1 This will always return 4 and the re... Pin
Member 740216615-Aug-11 23:23
Member 740216615-Aug-11 23:23 
GeneralReason for my vote of 1 wrong - man test it before posting Pin
johannesnestler14-Oct-10 3:56
johannesnestler14-Oct-10 3:56 
GeneralReason for my vote of 1 False Pin
Toli Cuturicu11-Oct-10 11:38
Toli Cuturicu11-Oct-10 11:38 
GeneralThis will always return 4! even if it is compiled in x64 mod... Pin
GPUToaster™21-Sep-10 0:51
GPUToaster™21-Sep-10 0:51 
This will always return 4! even if it is compiled in x64 mode.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.