How do I check the active solution configuration Visual Studio built with at runtime?

前端 未结 4 1564
梦谈多话
梦谈多话 2020-12-20 14:11

I would like to enable/disable some code based on a custom solution configuration I added in Visual Studio. How do I check this value at runtime?

4条回答
  •  温柔的废话
    2020-12-20 14:40

    You can use precompiler directives within Visual Studio. The #if directive will allow you to determine if you are going to include code or not based on your custom solution configuration.

提交回复
热议问题