Link to home
Create AccountLog in
Avatar of vbnetcoder
vbnetcoder

asked on

can anybody explain this: Dim something As New List(Of String)

Dim  something As New List(Of String)

What is it used for?
ASKER CERTIFIED SOLUTION
Avatar of Paul Jackson
Paul Jackson
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of vbnetcoder
vbnetcoder

ASKER

I assume it doesn't need to just work with strings?
No you can create a collection of any base data type, plus as the example i posted shows you can create a collection of custom objects
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
If you want a collection to hold anything (multiple data types at the same time) then use an ArrayList:
http://msdn.microsoft.com/en-us/library/system.collections.arraylist.aspx

*Usually not a good idea though.  Generic Lists are faster and safer.  If you find yourself needing an ArrayList to hold multiple data types then you probably need a re-design of your application architecture.
ty