generic list of T question

  • Thread starter Thread starter Simon Whale
  • Start date Start date
S

Simon Whale

[VB 2005 Pro]

I need to pass a list of T object to a class, but as i haven't had to use it
often i need someone to help me to a nice example of one :)

Many Thanks
Simon Whale
 
Simon said:
[VB 2005 Pro]

I need to pass a list of T object to a class, but as i haven't had to use it
often i need someone to help me to a nice example of one :)


Public Class Main

Shared Sub Main()
Dim list As New List(Of Integer)
list.Add(17)
list.Add(12)
MySub(list)
End Sub

Shared Sub MySub(ByVal list As List(Of Integer))
For Each item In list
Debug.Print(item.ToString)
Next
End Sub

End Class
 
Back
Top