我上篇博文说到了CLR 4.0类型嵌入特性, 那么请大家想一想类型嵌入是谁实现的?
选项A CLR 选项B 编译器 选项C TlbImp 选项D 微软
My last post talked about the “Type embedding” feature of CLR 4.0. Please think about who implemented “Type embedding”? These are options:
A. CLR B. Compiler C. TlbImp D. Microsoft
类型等价
在CLR4.0里, 如果两个不同的类型有相同的GUID, CLR 4.0认为此两个类型是等价的. 在CLR4.0的绑定过程中, 方法调用, 还有强制类型转换时, 等价的类型是可以替换的. 等价的类型通常是同一个事物的不同版本.
In CLR 4.0 world, CLR thinks two types are equivalent if the two types have the same GUID. One can be substitution of the other during type binding, method calls, and casting. The equivalent types usually are different versions of the same object.
等价的类型可替换程度取决于兼容性, 是完全兼容,还是前向兼容,还是后向兼容.
The substitution of the equivalent types depends on the compatibility of types, whether they are fully compatible, forward compatible, or backward compatible.
如果用Office 2007 PIA开发了一个Office应用, 但是只用到了Office 2003就有的功能, 那么在只有Office 2003的目标机器上, CLR4.0可以将这个Office应用绑定到Office 2003的接口上. 这说明Office 2007有部分后向兼容.
If we develop an office application using Office 2007 PIA, but we only use the functionalities that Office 2003 has. Then CLR 4.0 would bind the interfaces of Office 2003 to our office application on target machine with Office 2003 only. This means Office 2007 has backward compatibility with Office 2003.
mikelij 2009.03.09. 20:48