public class PInt{
//正确写法。
public static PInt operator +(PInt b, Action act)
{
b += act;
return b ;
}
}
public class PTest{
错误写法, 并不是写错了,而是重载参数中必须有一个是本类的参数
public static PInt operator +(PInt b, Action act)
{
b += act;
return b ;
}
}