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