473,473 Members | 2,155 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Collection datatype question.

Right now I am using Vector to store two values...something in the lines
of...

Vector v = new Vector();
v.Add("bob", 21);
v.Add("dan", 26);
v.Add("sally", 24);

but now using Vector which will only hold 2 values is not enough. Is
there something in the MS collections package that can store more than 2
values? Like...

v.Add("bob", 21, "1211 SouthLane Dr.", "active");

or do I need to create my own Collection class?
Nov 16 '05 #1
3 3024
Hi Dmitrii,

Why don't you create a class that stores your data and then just use
ArrayList to store those classes.

--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com

"Dmitrii PapaGerogio" <te***@woh.rr.comNOSPAM> wrote in message
news:Qo******************@fe2.columbus.rr.com...
Right now I am using Vector to store two values...something in the lines
of...

Vector v = new Vector();
v.Add("bob", 21);
v.Add("dan", 26);
v.Add("sally", 24);

but now using Vector which will only hold 2 values is not enough. Is
there something in the MS collections package that can store more than 2
values? Like...

v.Add("bob", 21, "1211 SouthLane Dr.", "active");

or do I need to create my own Collection class?

Nov 16 '05 #2
Hello,
where did you find a Vector in C# - could you give me a name of namespace?
i was looking for something similar to java.util.Vector in C#... but i
haven't found.

Adam

Uzytkownik "Dmitrii PapaGerogio" <te***@woh.rr.comNOSPAM> napisal w
wiadomosci news:Qo******************@fe2.columbus.rr.com...
Right now I am using Vector to store two values...something in the lines
of...

Vector v = new Vector();
v.Add("bob", 21);
v.Add("dan", 26);
v.Add("sally", 24);

but now using Vector which will only hold 2 values is not enough. Is
there something in the MS collections package that can store more than 2
values? Like...

v.Add("bob", 21, "1211 SouthLane Dr.", "active");

or do I need to create my own Collection class?

Nov 16 '05 #3
Kail wrote:
Hello,
where did you find a Vector in C# - could you give me a name of namespace?
i was looking for something similar to java.util.Vector in C#... but i
haven't found.

Adam

Uzytkownik "Dmitrii PapaGerogio" <te***@woh.rr.comNOSPAM> napisal w
wiadomosci news:Qo******************@fe2.columbus.rr.com...
Right now I am using Vector to store two values...something in the lines
of...

Vector v = new Vector();
v.Add("bob", 21);
v.Add("dan", 26);
v.Add("sally", 24);

but now using Vector which will only hold 2 values is not enough. Is
there something in the MS collections package that can store more than 2
values? Like...

v.Add("bob", 21, "1211 SouthLane Dr.", "active");

or do I need to create my own Collection class?


it's in the Collection namespace
Nov 16 '05 #4

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

Similar topics

14
by: Sanjay Minni | last post by:
What is the datatype to be used for Primary Key columns for most optimised access given that - There will be a single column primary key only - The values will only be integers (but as...
14
by: Elias Farah | last post by:
Hi All, What are people's experience in timing Query Performance? I have tried in vain, but get many unpredictable results, with execution proceeding in the background and problems of timing...
10
by: Mart | last post by:
What class does everyone out there use if they want to store a set of values efficiently? In java I use a HashSet, but there is no equivalent in C#. Even worse, the lowest level interface to...
8
by: Vinod | last post by:
Hi, I have a stored procedure which expects a varbinary datatype. How can i pass a varbinary datatype from asp.net directly to the stored procedure. I tried using the Convert function in Sql...
1
by: Weston Weems | last post by:
I've got a collection of objects say fruit. and fruit has a fairly decent heirachial structure not just flat props. I've got my repeater to bind to my fruit collection just fine, but what I want...
3
by: Michael Fällgreen | last post by:
Hi, I need to make a strongly typed collection of x, and the simplets way is to inherits list(of x). With that I can bind to a list-control. However - i don't need all the methods from list(of...
5
by: Bryan | last post by:
I have a class 'TagType' with an ilist member 'Props' that holds a collection of another class called 'Prop'. I let the user create TagTypes and save multiple properties (Props) in them. I am...
2
by: Torsten Z | last post by:
Hi, I have tried several things to passing an array of objects or a Object Collection from .NET to VB6 but I can't get it work. Passing one object works fine, but more than one not. Has anybody...
0
by: graju80 | last post by:
I am kind of new to Db2... Question: What are the rules that DB2 uses to determine the right datatype for a particular column for on-the-fly SQL generation? For example...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.