Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2008
Visual Studio
Visual C#
C# Reference
 Compiler Error CS0577
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
Visual C# Reference: Errors and Warnings
Compiler Error CS0577

The Conditional attribute is not valid on 'function' because it is a constructor, destructor, operator, or explicit interface implementation

Conditional cannot be applied to the specified methods.

For example, you cannot use some attributes on an explicit interface definition. The following sample generates CS0577:

// CS0577.cs
// compile with: /target:library
interface I
{
   void m();
}

public class MyClass : I
{
   [System.Diagnostics.Conditional("a")]   // CS0577
   void I.m() {}
}
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker