The [Conditional] Attribute
Historical article · Originally published September 1, 2003; technical details may be outdated.
If you want to write methods that are only available with conditional compiler arguments you can use an attribute just for that purpose:
<
Conditional("DEBUG")> _ Private Sub MyMethod() End Sub [Conditional("DEBUG")] Private void MyMethod(){}