C# 显示转换与隐式转换_记录
public static explicit operator Int32(A a)
{
return a.k;
}
//隐试转换
public static implicit operator A(Int32 i)
{
return new A() { k = i };
}
public static explicit operator Int32(A a)
{
return a.k;
}
//隐试转换
public static implicit operator A(Int32 i)
{
return new A() { k = i };
}