S
Seth Gecko
Hi
I am working with generic lists of various objects and a control
dealing with these lists. For instance:
A parent form holds:
dim Walls as List(Of wall)
dim Segments as List(Of segment)
The parent form have a custom control, which have a public sub looking
this:
Public sub InitTree(Of T as New)(ByRef OwnerList as List(Of T))
This means I can pass both Walls and Segments as parameter to
InitTree, which works like a charm. My problem is that I want to store
the OwnerList in a private variable inside the control, but how
exactly do I define a variable that can hold a List(Of T)? I still
want to be able to do GetType(T) on the variable, so I don't want to
simply store it as an Object or ICollection or something like that.
Suggestions please.
Regards
....Seth
I am working with generic lists of various objects and a control
dealing with these lists. For instance:
A parent form holds:
dim Walls as List(Of wall)
dim Segments as List(Of segment)
The parent form have a custom control, which have a public sub looking
this:
Public sub InitTree(Of T as New)(ByRef OwnerList as List(Of T))
This means I can pass both Walls and Segments as parameter to
InitTree, which works like a charm. My problem is that I want to store
the OwnerList in a private variable inside the control, but how
exactly do I define a variable that can hold a List(Of T)? I still
want to be able to do GetType(T) on the variable, so I don't want to
simply store it as an Object or ICollection or something like that.
Suggestions please.
Regards
....Seth