Export (0) Print
Expand All
Expand Minimize

Compiler Error CS0582

Conditional not valid on interface members

ConditionalAttribute is not valid on an interface member.

The following sample generates CS0582:

// CS0582.cs
interface MyIFace
{
   [System.Diagnostics.ConditionalAttribute("DEBUG")]   // CS0582, remove conditional attribute
   void zz();
}

public class MyClass
{
   public static void Main()
   {
   }
}
Show:
© 2014 Microsoft