Compiler Error CS0567
Interfaces cannot contain operators
Operators are not permitted in interface definitions.
The following sample generates CS0567:
// CS0567.cs
interface IA
{
int operator +(int aa, int bb); // CS0567
}
class Sample
{
public static void Main()
{
}
}
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: