Tag: iconvertible

为什么.Net Framework基类型不包含IConvertible方法的实现?

.Net Framework基类型,如Int32,Int64,Boolean等。 实现IConvertible接口,但这些类型的元数据不包含IConvertible接口中定义的方法的实现,如ToByte,ToBoolean等。 我试图理解为什么基类型没有方法实现,即使它们实现了IConvertible接口。 有人可以帮忙吗?