类似于(double)str的这种数据类型转换,被称为“显示强制转换” 实现它的机制 ,其实是调用了一个在对象类型内部定义的方法。 public static explicit operator double(int a) { ... }