Compiler Error CS0553
'conversion routine' : user defined conversion to/from base class
User-defined conversions to values of a base class are not allowed; you do not need such an operator.
The following sample generates CS0553:
C#
// CS0553.cs
namespace x
{
public class ii
{
}
public class a : ii
{
// delete the conversion routine to resolve CS0553
public static implicit operator ii(a aa) // CS0553
{
return new ii();
}
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: