Share via


컴파일러 오류 CS0471

업데이트: 2007년 11월

오류 메시지

메서드 'name'은(는) 제네릭 메서드가 아닙니다. 식 목록을 사용하려면 < 식 주위에 괄호를 사용하십시오.
The method 'name' is not a generic method. If you intended an expression list, use parentheses around the < expression.

이 오류는 코드에 식 목록이 괄호 없이 포함되어 있는 경우에 발생합니다.

예제

다음 예제에서는 CS0471 오류가 발생하는 경우를 보여 줍니다.

// CS0471.cs
// compile with: /t:library
class Test
{
    public void F(bool x, bool y) {}
    public void F1()
    {
        int a = 1, b = 2, c = 3;
        F(a<b, c>(3));    // CS0471
        // To resolve, try the following instead:
        // F((a<b), c>(3));
    }
}