Ashaman Posted June 18, 2003 Posted June 18, 2003 I want to build a custom collection class for a business object (say, 'Customer'). With VB6, I would delegate to a Collection and get the benefit of referencing items in the collection be either Index or Key. Trying to do the same thing with VB.Net, I tried to inherit 'System.Collections.CollectionBase', but it doesn't provide keys, just the index. So, I tried to inherit from 'System.Collections.Specialized.HybridDictionary', but it doesn't seem to provide the Index property. Is there an object that I can inherit from that gives me both? Thanks! Quote
Administrators PlausiblyDamp Posted June 18, 2003 Administrators Posted June 18, 2003 try NameObjectCollectionBase - MSDN says these can be accessed by key or index http://ms-help://MS.VSCC/MS.MSDNVS/cpref/html/frlrfSystemCollectionsSpecializedNameObjectCollectionBaseClassTopic.htm never used it myself though... Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
Ashaman Posted June 18, 2003 Author Posted June 18, 2003 You're awsome. At first glance, that appears to be *exactly* what I need. I feel silly that I couldn't find it, myself. Cheers! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.