Share via


컴파일러 경고(수준 1) CS1581

업데이트: 2007년 11월

오류 메시지

XML 주석 cref 특성에서 반환 형식이 잘못되었습니다.
Invalid return type in XML comment cref attribute

메서드를 참조하려고 할 때 컴파일러에서 잘못된 반환 형식으로 인한 오류를 발견했습니다.

예제

다음 샘플에서는 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
{
}