• Business
  • Finance
  • Banking
  • Education
  • General
  • Law
  • Science
  • IT
  • English

Key Differences

Know the Differences & Comparisons

Difference Between Array and ArrayList in C#

Last updated on June 8, 2019 by Surbhi S

array and arraylistWhat is an Array

An array is a sequential collection of similar data that can be accessed as per the “index”. It is the simplest type of data structure in which the elements get stored in a contiguous memory location.

In Array, index starts at zero, so to access the first element of an array “numarray”, it should be written as numarray[0].

Example of Array in C#
arrayOutput:-
10  20  30  40  50

What is an ArrayList

The ArrayList is a collection of objects of same or different types. The size of an ArrayList can be dynamically increased or decreased as per the requirement. It works like an array but unlike array in ArrayList items can be dynamically allocated or deallocated, i.e you can add, remove, index, or search for data in a collection.

Example of ArrayList in C-Sharp
array-listOutput:-
123  abc  67  pqr  45

Difference Between Array and ArrayList

  1. Array stores data of the same type whereas ArrayList stores data in the form of the object which may be of different types.
  2. Size of an ArrayList grows dynamically while Array size remains static throughout the program.
  3. Insertion and deletion operation in ArrayList is slower than an Array.
  4. Arrays are strongly typed whereas ArrayLists are not strongly typed.
  5. Arrays belong to System.Array namespace whereas ArrayList belongs to System.Collections namespace.
  6. When choosing between Array and ArrayList, decide on the basis of their features that you want to implement.

Related Differences

  • Difference Between MLA and APA
  • Difference Between Guarantee and Warranty
  • Difference Between Assume and Presume
  • Difference Between Partnership Firm and Company
  • Difference Between Histogram and Bar Graph

You Might Also Like:

Difference Between Interface and Class abstract class vs interfaceDifference Between Abstract class and Interface in C# write vs writelineDifference Between Write and WriteLine rows vs columnsDifference Between Rows and Columns questionnaire vs interviewDifference Between Questionnaire and Interview Data Vs InformationDifference Between Data and Information

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Top 5 Differences

  • Difference Between PERT and CPM
  • Difference Between Micro and Macro Economics
  • Difference Between Developed Countries and Developing Countries
  • Difference Between Management and Administration
  • Difference Between Qualitative and Quantitative Research

Related Differences

  • Difference Between MLA and APA
  • Difference Between Guarantee and Warranty
  • Difference Between Assume and Presume
  • Difference Between Partnership Firm and Company
  • Difference Between Histogram and Bar Graph



New Additions

  • Difference Between Society and Community
  • Difference Between Sourcing and Procurement
  • Difference Between National Income and Per Capita Income
  • Difference Between Departmental Store and Multiple Shops
  • Difference Between Thesis and Research Paper
  • Difference Between MBO and MBE
  • Difference Between Receipt and Payment Account and Income and Expenditure Account
  • Difference Between Stock Dividend and Stock Split
  • Difference Between FOB and CIF Contracts
  • Difference Between Verification and Valuation
fb-follow youtube follow

Copyright © 2023 · Key Differences · Contact Us · About Us · Privacy