Home All Groups Group Topic Archive Search About

[Conditional("DEBUG")]

Author
22 Nov 2006 9:42 AM
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

Author
22 Nov 2006 6:50 PM
Jon Shemitz
Martin Madreza wrote:

> 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")].

--

..NET 2.0 for Delphi Programmers
www.midnightbeach.com/.net
What you need to know.
Author
22 Nov 2006 11:00 PM
Lloyd Dupont
or you could
[Conditional("RELEASE")]

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

Show quote
"Martin Madreza" <madmakdr***@yahoo.de> wrote in message
news:1164188545.342805.224220@e3g2000cwe.googlegroups.com...
> 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
>

AddThis Social Bookmark Button