CLR 4.0 有哪些新东西? -- 类型等价
CLR 4.0 有哪些新東西? -- 類型等價(jià)
我上篇博文說到了CLR 4.0類型嵌入特性, 那么請(qǐng)大家想一想類型嵌入是誰實(shí)現(xiàn)的?
選項(xiàng)A?? CLR??? 選項(xiàng)B? 編譯器? 選項(xiàng)C TlbImp? 選項(xiàng)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
類型等價(jià)
在CLR4.0里, 如果兩個(gè)不同的類型有相同的GUID, CLR 4.0認(rèn)為此兩個(gè)類型是等價(jià)的. 在CLR4.0的綁定過程中, 方法調(diào)用, 還有強(qiáng)制類型轉(zhuǎn)換時(shí), 等價(jià)的類型是可以替換的. 等價(jià)的類型通常是同一個(gè)事物的不同版本.
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.
等價(jià)的類型可替換程度取決于兼容性, 是完全兼容,還是前向兼容,還是后向兼容.
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開發(fā)了一個(gè)Office應(yīng)用, 但是只用到了Office 2003就有的功能, 那么在只有Office 2003的目標(biāo)機(jī)器上, CLR4.0可以將這個(gè)Office應(yīng)用綁定到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 閱讀(...) 評(píng)論(...) 編輯 收藏
《新程序員》:云原生和全面數(shù)字化實(shí)踐50位技術(shù)專家共同創(chuàng)作,文字、視頻、音頻交互閱讀總結(jié)
以上是生活随笔為你收集整理的CLR 4.0 有哪些新东西? -- 类型等价的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 小朋友的最新动态
- 下一篇: 实现软件自动启动代码