컴파일러 오류 CS1678
업데이트: 2007년 11월
오류 메시지
'number' 매개 변수가 'type1' 형식으로 선언되었지만 'type2' 형식이어야 합니다.
Parameter 'number' is declared as type 'type1' but should be 'type2'
이 오류는 무명 메서드의 매개 변수 형식이 메서드를 캐스팅할 대리자의 선언과 다른 경우에 발생합니다.
다음 샘플에서는 CS1678 오류가 발생하는 경우를 보여 줍니다.
// CS1678
delegate void D(int i);
class Errors
{
static void Main()
{
D d = delegate(string s) { }; // CS1678
// To resolve, use the following line instead:
// D d = delegate(int s) { };
}
}