VB6-> VB.NET-> VB.NET/Whidbey集合类更改

Remember all the weirdness around Collections and VB6 when VB.NET came out?  I just noticed this breaking change as we move from 1.1 to Whidbey.  Previously added workaround code will have to be removed.

还记得VB.NET发行时围绕Collections和VB6的所有怪异现象吗? 当我们从1.1转到Whidbey时,我只是注意到了这一重大变化。 以前添加的解决方法代码将必须删除。

VB collections have weird implementation of IList: 0 based for read and -1 based for insertion
Affected APIs none
: Ilist implementation of VB collection is fixedAffected Assemblies\Dll(s): Microsoft.VisualBasic.dllAffected Scenarios: Upgraded apps that use VB Collection through inconsistent implementation of Ilist (very unlikely scenario) may be broken.Description: An instance of Collection type is casted to Ilist and then used via Ilist interface. To make this work in 7.0, 7.1 you would need to specialcase access to Ilist if it holds Collection
Workaround Code that has special-case warkarounds to use Collections casted to Ilist, will have to remove workarounds.

VB集合具有IList的怪异实现:0表示读取,-1表示插入受影响的API无:修复了Vlist集合的Ilist实现受影响的程序集\ Dll: Microsoft.VisualBasic.dll 受影响的方案:通过Ilist的不一致实现(极不可能的方案)使用VB集合的已升级应用程序可能会损坏。 说明: Collection类型的实例被强制转换为Ilist,然后通过Ilist接口使用。 要使此功能在7.0、7.1中工作,如果Ilist拥有Collection,则需要对Ilist进行特殊访问解决方法代码具有特殊情况的解决方法以使用强制转换为Ilist的Collections,因此必须删除解决方法。

翻译自: https://www.hanselman.com/blog/vb6vbnetvbnetwhidbey-collection-class-change

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值