[Conditional("DEBUG")]

  • Thread starter Thread starter Martin Madreza
  • Start date Start date
M

Martin Madreza

Hi,

maybe someone knows if there is a possibility to use the
[Conditional("DEBUG")] method sign with a 'Not' like

#if !DEBUG
....do somethin
#endif


[Conditional("DEBUG")]
private void myMethod()
{
}

exists somethiong like this???

[Conditional("DEBUG", false)]
private void myMethod()
{
}


i'm working with framework 1.1

thanks

martin madreza
 
Martin said:
exists somethiong like this???

[Conditional("DEBUG", false)]
private void myMethod()
{
}

No, but you can always start your file with

#if !DEBUG
#define NotDebug
#endif

and then use [Conditional("NotDebug")].
 
or you could
[Conditional("RELEASE")]

However that's rather unusual.....
How do you test it?
 
Back
Top