Compiler Warning (level 1) CS1581
Invalid return type in XML comment cref attribute
When attempting to reference a method, the compiler detected an error due to an invalid return type.
The following sample generates CS1581:
// CS1581.cs
// compile with: /W:1 /doc:x.xml
/// <summary>help text</summary>
public class MyClass
{
/// <summary>help text</summary>
public static void Main()
{
}
/// <summary>help text</summary>
public static explicit operator int(MyClass f)
{
return 0;
}
}
/// <seealso cref="MyClass.explicit operator intt(MyClass)"/> // CS1581
// try the following line instead
// /// <seealso cref="MyClass.explicit operator int(MyClass)"/>
public class MyClass2
{
}
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: