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