Csharp/CSharp Tutorial/Development/Attribute
Conditional Attribute
using System;
using System.Diagnostics;
class Program {
static void Main(string[] args) {
Program.DebugOnly();
}
[Conditional("DEBUG")]
public static void DebugOnly() {
Console.WriteLine("This string only displays in Debug");
}
}