Using C#, how to get whether my machine is 64bit or 32bit?

后端 未结 6 1063
陌清茗
陌清茗 2021-02-19 14:23

Using C#, I would like to create a method that retunrs whether my machine is 64 or 32-bit.

Is there anybody who knows how to do that?

6条回答
  •  滥情空心
    2021-02-19 15:02

    System.Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE")
    

    see this question.

提交回复
热议问题