Thanks Ken. I also found this article about generic collections.
http://msdn.microsoft.com/msdnmag/issues/04/09/AdvancedBasics/default.aspx
In this article they say that you will be able to use generics on methods
with the following syntax;
Public Sub Swap(Of MyType) (ByRef item1 As MyType, _
ByRef item2 As MyType)
Dim temp As MyType
temp = item1
item1 = item2
item2 = temp
End Sub
Do you know if this will be able to be done on class definitions so that
generic classes that are not collections can be created. For example, will
the following be valid in VB.Net 2005?
Public Class MyGenericClass(Of MyType)
Private data1 As MyType
Public Sub New(Of MyType) (newData as MyType)
data1 = newData
End Sub
Public Sub DoStuff(Of MyType) (data As MyType, repeat As Long)
'Do stuff
End Sub
End Class
Thanks again.
Robby.
> Hi,
>
[quoted text clipped - 19 lines]
>
> Robby
Robby - 13 Dec 2004 11:54 GMT
Hi Ken
Tom gave me a link that answers this new question about non-collection
generic classes. It seems I will not have to repeat the "(Of MyType)" in
the class method definitions.
Thanks again.
Robby
> Thanks Ken. I also found this article about generic collections.
>
[quoted text clipped - 57 lines]
>>
>> Robby