using System;
using System.Diagnostics;
class MyClass
{
public MyClass(int i)
{
this.i = i;
}
[Conditional("DEBUG")]
publicvoid VerifyState()
{
if (i != 0)
Console.WriteLine("Bad State");
}
int i = 0;
}
publicclass DefensiveProgrammingConditionalMethods
{
publicstaticvoid Main()
{
MyClass c = new MyClass(1);
c.VerifyState();
}
}