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.

Example

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  
{  
}