Compilerwarnung (Stufe 1) CS1581

Aktualisiert: November 2007

Fehlermeldung

Ungültiger Rückgabetyp im cref-Attribut des XML-Kommentars.
Invalid return type in XML comment cref attribute

Bei dem Versuch, auf eine Methode zu verweisen, hat der Compiler einen Fehler entdeckt, der auf einen ungültigen Rückgabetyp zurückzuführen ist.

Beispiel

Im folgenden Beispiel wird CS1581 generiert:

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