Share via


컴파일러 오류 CS1952

업데이트: 2007년 11월

오류 메시지

식 트리 람다에는 가변 인수가 있는 메서드를 사용할 수 없습니다.
An expression tree lambda may not contain a method with variable arguments

지원되지 않는 __arglist 키워드는 식 트리에 컴파일되는 람다 식에 사용할 수 없습니다.

이 오류를 해결하려면

  • __arglist를 사용하지 않습니다.

예제

다음 코드에서는 CS1952 오류가 발생하는 경우를 보여 줍니다.

// cs1952.cs
using System;
using System.Linq.Expressions;

class Test
{
    public static int M(__arglist)
    {
        return 1;
    }

    static int Main()
    {
        Expression<Func<int, int>> f = x => Test.M(__arglist(x)); // CS1952
        return 1;
    }
}