Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

Tip: Testing for 64 Bit or 32 Bit in a C# Application

A quick and dirty way to see if the application's current platform is 64- or 32-bit.


advertisement

A quick and dirty way to see if the application's current platform is 64-bit or 32-bit is to test the size of the System.IntPtr variable, as shown in the following example:

if (System.IntPtr.Size == 8) 
{ 
    // 64-bit 
} 
else 
{ 
    // 32-bit 
}

 



Visit the DevX Tip Bank

 



   
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date