更新:2007 年 11 月
错误消息
“method”不能在 ref 参数上仅指定 Out 属性。请同时使用 In 和 Out 属性,或者两者都不使用。接口方法的一个参数使用了只有
下面的示例生成 CS0662:
// CS0662.cs
using System.Runtime.InteropServices;
interface I
{
void method([Out] ref int i); // CS0662
// try one of the following lines instead
// void method(ref int i);
// void method([Out, In]ref int i);
}
class test
{
public static void Main()
{
}
} | |