CLR 4.0 有哪些新东西? -- 类型等价

CLR 4.0 有哪些新东西? -- 类型等价

我上篇博文说到了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

posted on 2009-03-09 20:53 mikelij 阅读(...) 评论(...) 编辑 收藏

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值