PC Review


Reply
Thread Tools Rate Thread

Conditional attribute is not working

 
 
Julian Hershel
Guest
Posts: n/a
 
      31st Mar 2004
Hi.

I am playing with the Conditional attribute. If I define
Conditional("DEBUG") for my method and compiles my application as a release
build, the method won't be called, as expected. If I define the attribute as
Conditional("RELEASE") and compiles my application as a release build the
method still won't be called. Why? AM I missing something?

Thank you,
Julian


 
Reply With Quote
 
 
 
 
Jay B. Harlow [MVP - Outlook]
Guest
Posts: n/a
 
      1st Apr 2004
Julian,
DEBUG is defined for Debug Builds, while DEBUG is not defined for Release
builds.

While RELEASE is not defined for either Debug or Release Builds!


Did you use use Project Properties to define RELEASE=True for Release
Builds?


Hope this helps
Jay

"Julian Hershel" <(E-Mail Removed)> wrote in message
news:u6%(E-Mail Removed)...
> Hi.
>
> I am playing with the Conditional attribute. If I define
> Conditional("DEBUG") for my method and compiles my application as a

release
> build, the method won't be called, as expected. If I define the attribute

as
> Conditional("RELEASE") and compiles my application as a release build the
> method still won't be called. Why? AM I missing something?
>
> Thank you,
> Julian
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Attribute on Method when the condition is met Frank Munsberg Microsoft C# .NET 7 10th Jun 2008 07:05 AM
Conditional compilation attribute vooose Microsoft C# .NET 3 1st Dec 2005 05:46 AM
Conditional attribute no longer allows out parameters? GlennDoten Microsoft C# .NET 2 5th Nov 2005 10:09 PM
Conditional attribute question Nicole Schenk Microsoft ASP .NET 5 2nd Feb 2005 08:09 AM
Serializable attribute not working =?Utf-8?B?ZmFrdHVqYWE=?= Microsoft C# .NET 1 1st Apr 2004 10:16 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:30 AM.