Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic Arrays in C#

Status
Not open for further replies.

Pyramus

Programmer
Dec 19, 2001
237
GB
What's the deal with dynamic arrays in c#? (the book I have doesn't cover this well at all).

Am I right in saying ArrayList will do everything you want? For example, will this do the job of replacing the STL classes <list> and <vector> in c++?

ANy info or links to good web pages on this will be helpful.
 
I haven't worked with vector or list in C++, but that's what I can tell you about the ArrayList class:
- It can contain arrays that change sizes;
- The elements inside can be of any type (you can have, for example, bool and char elements inside the array);
- You can use an ArrayList with the array syntax (e.g. a = arrayList[1]; or arrayList[2] = a);
- You can search through an ArrayList a value with the method IndexOf().

You can find these by looking into MSDN.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top