更新:2007 年 11 月
错误消息
委托“delegate”有一些无效参数
传递给 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);
   }
}