C# Directive to indicate 32-bit or 64-bit build

后端 未结 9 1474
你的背包
你的背包 2020-12-16 04:04

Is there some sort of C# directive to use when using a development machine (32-bit or 64-bit) that says something to the effect of:

if (32-bit Vista)
    // set a         


        
9条回答
  •  北海茫月
    2020-12-16 04:44

    You can use Predefined Macros to set the properties on compilation

        #if (_WIN64) 
      const bool IS_64 = true;
    #else
      const bool IS_64 = false;
    #endif
    

提交回复
热议问题