473,387 Members | 1,510 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

[Beginner] Arrays of variable length in c#

In C++ the standard classes vector and deque define an array of real-time
variable length (items can be appended or removed to a vector, modifying its
length).

Is there a class in C# that performs the same functionality (probably a
ListBox control can perform it, but it's not a standard solution) ?
Nov 16 '05 #1
4 1605
Hi,

See if ArrayList can fulfill your requirements.

"Flix" <wr***@newsgroup.comeon> wrote in message
news:cd**********@lacerta.tiscalinet.it...
In C++ the standard classes vector and deque define an array of real-time
variable length (items can be appended or removed to a vector, modifying its
length).

Is there a class in C# that performs the same functionality (probably a
ListBox control can perform it, but it's not a standard solution) ?

Nov 16 '05 #2
Flix <wr***@newsgroup.comeon> wrote:
In C++ the standard classes vector and deque define an array of real-time
variable length (items can be appended or removed to a vector, modifying its
length).

Is there a class in C# that performs the same functionality (probably a
ListBox control can perform it, but it's not a standard solution) ?


ArrayList is probably what you're after.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #3
Is there a class in C# that performs the same functionality (probably a
ListBox control can perform it, but it's not a standard solution) ?


System.Collections.ArrayList

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 16 '05 #4
> "Flix" <wr***@newsgroup.comeon> wrote in message
news:cd**********@lacerta.tiscalinet.it...
In C++ the standard classes vector and deque define an array of real-time
variable length (items can be appended or removed to a vector, modifying its length).
Is there a class in C# that performs the same functionality (probably a
ListBox control can perform it, but it's not a standard solution) ?

"Shiva" <sh******@online.excite.com> wrote in message
news:%2***************@TK2MSFTNGP11.phx.gbl... Hi,
See if ArrayList can fulfill your requirements.


Other collection classes can be found in System.Collections.

And if you wait long enough for the next .NET standard, you will enjoy
template versions of these classes.

Cheers,
---
Tom Tempelaere
Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Foxy Kav | last post by:
Hi everyone, Im currently doing first year UNI, taking a programming course in C++, for one project i have to create a simple array manipulator... that i have done, but i cant figure out how to...
27
by: Mike P | last post by:
I will be passing my function a two dimensional array of varying length. Within that array is one data point, and the number of times it should loop through. So, for example, I might pass this...
6
by: JNY | last post by:
Hello, Is it possible to declare an array with variable indeces? i.e. int x = 4; int myArray; for (j = 0;j < 5;j++) {
11
by: truckaxle | last post by:
I am trying to pass a slice from a larger 2-dimensional array to a function that will work on a smaller region of the array space. The code below is a distillation of what I am trying to...
33
by: Peter Seaman | last post by:
I understand that structures are value types and arrays and classes are reference types. But what about arrays as members of structures i.e. as in C struct x { int n; int a; }
38
by: ssg31415926 | last post by:
I need to compare two string arrays defined as string such that the two arrays are equal if the contents of the two are the same, where order doesn't matter and every element must be unique. ...
6
by: mechanicfem | last post by:
In f(), I am passing a parameter of array type - /size/ indicates the array's length: void f(char arr, int size); In the c99 stds, it mentions the use of and says (I think) that it can be...
1
by: Doug_J_W | last post by:
I have a Visual Basic (2005) project that contains around twenty embedded text files as resources. The text files contain two columns of real numbers that are separated by tab deliminator, and are...
7
by: Cromulent | last post by:
In section 6.7.5.2 it states the following: If the size is not present, the array type is an incomplete type. If the size is*instead of being an expression, the array type is a variable length...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.