컴파일러 오류 CS1593
업데이트: 2007년 11월
오류 메시지
'del' 대리자는 'number'개의 인수를 사용할 수 없습니다.
Delegate 'del' does not take 'number' arguments
delegate 호출에 전달한 인수의 개수가 대리자 선언에 있는 매개 변수의 개수와 다릅니다.
다음 샘플에서는 CS1593 오류가 발생하는 경우를 보여 줍니다.
// CS1593.cs
using System;
delegate string func(int i); // declare delegate
class a
{
public static void Main()
{
func dt = new func(z);
x(dt);
}
public static string z(int j)
{
Console.WriteLine(j);
return j.ToString();
}
public static void x(func hello)
{
hello(8, 9); // CS1593
// try the following line instead
// hello(8);
}
}