vb6函数属性的vb.net等价物
我在vb6函数属性的vb.net等价物,vb.net,vb6,attributes,vb6-migration,Vb.net,Vb6,Attributes,Vb6 Migration,我在vb6中有以下类: Public Function NewEnum() Attribute NewEnum.VB_UserMemId = -4 Attribute NewEnum.VB_MemberFlags = "40" NewEnum = mcolFields.[_NewEnum] End Function vb.net中的等效属性是什么?我知道你必须在中放置属性,我也发现了这样的帖子,但它并没有解决我的问题。关于这方面的一些信息如下: VB_UserMem
vb6
中有以下类:
Public Function NewEnum()
Attribute NewEnum.VB_UserMemId = -4
Attribute NewEnum.VB_MemberFlags = "40"
NewEnum = mcolFields.[_NewEnum]
End Function
vb.net中的等效属性是什么?我知道你必须在
中放置属性,我也发现了这样的帖子,但它并没有解决我的问题。关于这方面的一些信息如下:
VB_UserMemId还有一个特殊值,该值为-4。
负数4始终表示被标记的函数应
返回一个[_NewEnum]枚举数
我想说,在这种情况下,你可以忽略它们。所以你的等价物应该是这样的:
Public Function NewEnum() As mcolFields
Return New mcolFields
End Function
有关这方面的一些信息如下: VB_UserMemId还有一个特殊值,该值为-4。 负数4始终表示被标记的函数应 返回一个[_NewEnum]枚举数 我想说,在这种情况下,你可以忽略它们。所以你的等价物应该是这样的:
Public Function NewEnum() As mcolFields
Return New mcolFields
End Function
GetEnumerator()是完全等效的。它在
代码中作为NewEnum公开。只需实现System.Collections.IEnumerable接口,即非泛型接口。GetEnumerator()是完全等效的接口。它在
代码中作为NewEnum公开。只需实现System.Collections.IEnumerable接口,即非泛型接口