更新:2007 年 11 月
错误消息
属性或索引器不得作为 out 或 ref 参数传递
示例
下面的示例生成 CS0206:
// CS0206.cs
public class MyClass
{
    public static int P
    {
        get
        {
            return 0;
        }
        set
        {
        }
    }
    public static void MyMeth(ref int i)
    // public static void MyMeth(int i)
    {
    }
    public static void Main()
    {
        MyMeth(ref P);   // CS0206
        // try the following line instead
        // MyMeth(P);   // CS0206
    }
} | |