更新:2007 年 11 月
错误消息
一元运算符的参数必须是包含类型
运算符重载的方法声明必须遵循一定的准则。有关更多信息,请参见可重载运算符和“运算符重载”示例。
示例
下面的示例生成 CS0562:
// CS0562.cs
public class iii
{
    public static implicit operator int(iii x)
    {
        return 0;
    }
    public static implicit operator iii(int x)
    {
        return null;
    }
    public static iii operator +(int aa)   // CS0562
    // try the following line instead
    // public static iii operator +(iii aa)
    {
        return (iii)0;
    }
    public static void Main()
    {
    }
}