-
Nested collections in VB.Net
Hello
I would like to recreate the same functionality as the example below
Collection1("id").Collection2("ID").Collection3("ID").SomeProperty=somevalue
I do know that all collections in this examples will have to be derived from
classes because each of these collections have different properties and methods.
But how exactly do I do that?
Yours truly
Andy
-
Re: Nested collections in VB.Net
Not sure to understand. You could create a collection using CollectionBase
(or even something else that would be closer from what you need).
I don't see what specific problem could cause the this imbrication. if all
these collections have their own properties/method (I assume you want
strongly typed collections ?) you'll just have 3 different collection
classes.
"Andy" <x_terminat_or@yahoo.fr> a écrit dans le message de news:
3da2912f$1@10.1.10.29...
>
> Hello
>
> I would like to recreate the same functionality as the example below
>
>
>
Collection1("id").Collection2("ID").Collection3("ID").SomeProperty=somevalue
>
>
> I do know that all collections in this examples will have to be derived
from
> classes because each of these collections have different properties and
methods.
> But how exactly do I do that?
>
>
> Yours truly
>
>
> Andy
-
Re: Nested collections in VB.Net
G'day Andy.
>I would like to recreate the same functionality as the example below
>
>
>Collection1("id").Collection2("ID").Collection3("ID").SomeProperty=somevalue
Something like this would do it:
Public Class MyFirstColl
...
Public Default Property Item(Byval Identifier as String ) as AnObject
...
End Property
...
End Class
Public Class MySecondColl
...
Public Default Property Item(Byval Identifier as String) As MyFirstColl
...
'Get/Set your Instance of MyFirstColl here
...
End Property
...
End Class
etc etc
HTH,
Cheers,
Paul
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks