Groups | Blog | Home
all groups > vb.net > march 2007 >

vb.net : Vectors in VB.NET?


Kerry Moorman
3/31/2007 8:30:02 PM
John,

You might be able to use an arraylist or a list (Of Integer).

Kerry Moorman


[quoted text, click to view]
John
3/31/2007 11:05:53 PM
Is it possible to implement vectors in VB.net as done in C++? If not, how
can I declare an object that is a collection of integers similar to a
vector?

pvdg42
3/31/2007 11:56:29 PM

[quoted text, click to view]
You can use any of the .NET collections classes, some of which will give you
equivalent functionality:

http://msdn2.microsoft.com/en-us/library/0ytkdh4s.aspx

Tom Shelton
4/1/2007 2:07:04 AM
[quoted text, click to view]

Hmmm, System.Collections.Generic.List is probably the closest to the
STL Vector class... Assuming your are using VB2005. If you are using
a previous version, then look at the System.Collections.ArrayList
class - though, it won't be as efficient because it takes type object
and so you will have boxing overhead with value types such as integer.

--
Tom Shelton
AddThis Social Bookmark Button