vector

what is the equivalent of vector in java to c#?
DWR200Asked:
Who is Participating?
 
paddycobbettCommented:
A vector is c#: System.Collections.ArrayList

=)
0
 
paddycobbettCommented:
Please rephrase the question? What is the c# equivalent of a java vector? Or the other way round?
0
 
DWR200Author Commented:
i want to convert from java to C#. which i need to know what is vector in c#.
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

 
doraemon-nolifeCommented:
The main difference between ArrayList and Vector is that Vector is thread safe but not for ArrayList.

The vector object in java is defaulted to be synchronized. To guarantee the thread safe features.

Basically, ArrayList in java and C# is the same and there is no Vector in C#

To achieve the same effect, you would need to do the primitive synchronization

Check this site to prove what i said it true.
http://msdn2.microsoft.com/en-us/library/system.collections.arraylist.aspx

Note:
1. Manual synchronization requires careful coding, else it would give you more problem.

2. Synchronization is a performance hit, think twice before you use it.

:)



0
 
paddycobbettCommented:
If the java.util.List functionality is what you need then System.Collections.ArrayList will suffice, if you need synchronization on individual elements is what you need then please specify that =)
0
 
Computer101Commented:
Forced accept.

Computer101
EE Admin
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.