C# !Conditional attribute?

前端 未结 7 1324
既然无缘
既然无缘 2020-12-08 18:08

Does C# have a not Conditional (!Conditional, NotConditional, Conditional(!)) attribute?


i know C#

7条回答
  •  悲&欢浪女
    2020-12-08 18:37

    #ifndef ShowDebugString
    #define RemoveSDS
    #endif
    

    ?

    edit: For more clarification. If ShowDebugString is defined Conditional["ShowDebugString"] will be called. If ShowDebugString is not defined, Conditional["RemoveSDS"] will be called.

提交回复
热议问题