更新 : 2007 年 11 月
エラー メッセージ
デリゲート 'delegate' に無効な引数があります。
デリゲート呼び出しに渡された引数の型が、デリゲート宣言のパラメータの型と一致しません。
次の例では CS1594 エラーが生成されます。
// CS1594.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"); // CS1594
// try the following line instead
// hello(8);
}
}