更新:2007 年 11 月

错误消息

方法或委托参数不能是“type”类型

.NET Framework 类库中的某些类型(例如 TypedReference、RuntimeArgumentHandle 和 ArgIterator)不能用作 ref 或 out 参数,因为它们有可能会被用来执行不安全的操作。

下面的示例生成 CS1601:

 复制代码
// CS1601.cs
using System;

class MyClass
{
   public void Test1 (ref TypedReference t)   // CS1601
   {
   }

   public void Test2 (out ArgIterator t)   // CS1601
   {
   }
}