Posted on 2007-07-24
Last Modified: 2010-05-18
what is the equivalent of vector in java to c#?
Question by:DWR200
    LVL 1

    Expert Comment

    Please rephrase the question? What is the c# equivalent of a java vector? Or the other way round?

    Author Comment

    i want to convert from java to C#. which i need to know what is vector in c#.
    LVL 1

    Accepted Solution

    A vector is c#: System.Collections.ArrayList

    LVL 4

    Assisted Solution

    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.

    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.


    LVL 1

    Expert Comment

    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 =)
    LVL 1

    Expert Comment

    Forced accept.

    EE Admin

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Javascript: Crash Course

    Javascript is not only emerging as the most important language to know, it's flexibility is unique. With Javascript being deployed on the web, mobile and even the desktop this is the one language that all technologists need to know.

    Preface: This article is part of a series focused on cross platform mobile app development (specifically Android and iOS) using the Alloy framework and Titanium Studio made by Appcelerator ( This article presumes a wor…
    Let me explain this picture a little bit.  First, in case you haven't already guessed, you are looking at my 2 phones, an Android Samsung Galaxy S5 on the left and an iPhone 5 on the right.  They are on their respective cradles on my desk.  But, you…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now