Hi,

There's a bug in the Microsoft documentation which leaked in mono source code.

In ConditionalAttribute.cs,

[AttributeUsage(AttributeTargets.Method)]

Should be

[AttributeUsage(AttributeTargets.Method,AllowMultiple=true)]

To reproduce the case, just try to compile the following:

#define DEBUG
#define TRACE
public class Test
{
        public static void Main(string args[])
        {
                WriteMe();
        }
        
        [Conditional("DEBUG"),Conditional("TRACE")]
        public static void WriteMe()
        {
                Console.WriteLine("This is me");
        }
}

The compiler is allowed to ignore the attribute, but at least it should compile it :)

PS: I'm no longer subscribed to the list. If you  need me, write on my corp email.

Sebastien Lambla
_______________________________________________
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to