Conditional compilation for ignoring method calls with the ConditionalAttribute

added by DotNetKicks
6/29/2021 10:29:17 AM

958 Views

The other day at work I ran into an attribute I hadn't heard about, the [Conditional] attribute. In this post I start by describing conditional compilation using pre-processor directives like #if, and then introduce the [Conditional] attribute, and describe how it differs to using #if.


0 comments