all groups > vb.net upgrade > november 2005 >
You're in the

vb.net upgrade

group:

Upgrading Collections


Re: Upgrading Collections Herfried K. Wagner [MVP]
11/7/2005 12:00:00 AM
vb.net upgrade:
"Birdair" <birdair@community.nospam> schrieb:
[quoted text, click to view]

Does the code compile? If yes, does it work as expected? AFAIS you could
reuse this piece of code without any changes if 'Option Strict Off' is used.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Upgrading Collections Birdair
11/7/2005 11:19:17 AM
I have the following code in VB6:

Dim obj as Object

For Each obj in MyCollection
obj.MySub(argument)
Next obj

MyCollection is a collection of objects of different types of my own
creation. Each of these objects has a subroutine named MySub which takes an
argument.

Upon upgrade to VB.Net, I get an upgrade warning saying that obj.MySub's
default property cannot be determined. The written documentation is not
helpful for this case.

How do I accomplish this in VB.Net? Thanks.

AddThis Social Bookmark Button