Visual Basic and generics

  • Thread starter Thread starter Guest
  • Start date Start date
Quick sample(s)

Class C1(of T)
Dim arrayvar() as T
Function foo(arg as T) as T
End Function
End Class

'constrained
Class C2(Of Y as new)
Sub test
Dim z as new Y
End Sub
End Class

--------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top