Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / VB 6.0 >>> VB.NET / November 2005

Tip: Looking for answers? Try searching our database.

Upgrading Collections

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Birdair - 07 Nov 2005 16:19 GMT
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.
Herfried K. Wagner [MVP] - 07 Nov 2005 16:57 GMT
"Birdair" <birdair@community.nospam> schrieb:
>I have the following code in VB6:
>
[quoted text clipped - 12 lines]
> default property cannot be determined.  The written documentation is not
> helpful for this case.

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.

Signature

M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.