What is the usage of #if DEBUG pre-processor directive in C#? When must we use this?

前端 未结 5 943
梦谈多话
梦谈多话 2021-01-11 10:55

What is the usage of #if DEBUG pre-processor directive in C#? When must we use this?

5条回答
  •  既然无缘
    2021-01-11 11:34

    it also comes in handy when testing windows services. You can put in an #if DEBUG to start your process manually, so you don't have to install the service and attach to it to debug.

提交回复
热议问题