#if Not Debug in c#?

前端 未结 5 1341
生来不讨喜
生来不讨喜 2020-12-24 11:07

I have the line in vb code:

#if Not Debug

which I must convert, and I don\'t see it in c#?

Is there something equivalent to it,

5条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-24 11:44

    Just in case it helps someone else out, here is my answer.

    This would not work right:

    #if !DEBUG
         // My stuff here
    #endif
    

    But this did work:

    #if (DEBUG == false)
         // My stuff here
    #endif
    

提交回复
热议问题