C# 显示转换与隐式转换_记录

 public static explicit operator Int32(A a)
{
return a.k;
}
//隐试转换
public static implicit operator A(Int32 i)
{
return new A() { k = i };
}
原文地址:https://www.cnblogs.com/blackman/p/2242200.html