更新:2007 年 11 月
错误消息
参数“number”不应用“keyword”关键字声明
当匿名方法中的参数类型修饰符与您要将该方法强制转换为的委托的声明中使用的修饰符不匹配时,则会发生此错误。
示例
下面的示例生成 CS1677:
// CS1677.cs
delegate void D(int i);
class Errors
{
static void Main()
{
D d = delegate(out int i) { }; // CS1677
// To resolve, use the following line instead:
// D d = delegate(int i) { };
D d = delegate(ref int j){}; // CS1677
// To resolve, use the following line instead:
// D d = delegate(int j){};
}
}