By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,714 Members | 1,182 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,714 IT Pros & Developers. It's quick & easy.

VB6 cast generic collection item to custom class

P: n/a
Hi. My VB6 application has several collections of custom classes, and each class has differing properties (ie. the classes are not necessarily related). I want to write a generic function which can be passed any collection in order to populate a control based on the objects in the collection. I figure I would have to pass the type of object into the function too in order to be able to cast each item of the collection, plus, say, a string array of field names (representing class properties) the user wanted to display in the control. Any pointers how to do this

Thank

Dav
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
I appear to have underestimated VB6 here. I do not need to cast a collection item to access it's properties. However, I still need the ability to access an object's properties using a string representation of each property name. I have posted a new question under the title "VB6: Access object properties by name"

DT
Nov 20 '05 #2

P: n/a
Hi Dave,

Did you know this is a VB.net newsgroup. The language is a look a like for
VB 6 however the use of it is when done well completly different.

There are a lot of newsgroups

microsoft.public.VB which are for classic VB

I hope this helps?

Cor
Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.