Compiler Error CS0582
The Conditional not valid on interface members
ConditionalAttribute is not valid on an interface member.
The following sample generates CS0582:
// CS0582.cs
// compile with: /target:library
using System.Diagnostics;
interface MyIFace
{
[ConditionalAttribute("DEBUG")] // CS0582
void zz();
}
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
.NET feedback
.NET is an open source project. Select a link to provide feedback: