
- C# Basic Tutorial
- C# - Home
- C# - Overview
- C# - Environment
- C# - Program Structure
- C# - Basic Syntax
- C# - Data Types
- C# - Type Conversion
- C# - Variables
- C# - Constants
- C# - Operators
- C# - Decision Making
- C# - Loops
- C# - Encapsulation
- C# - Methods
- C# - Nullables
- C# - Arrays
- C# - Strings
- C# - Structure
- C# - Enums
- C# - Classes
- C# - Inheritance
- C# - Polymorphism
- C# - Operator Overloading
- C# - Interfaces
- C# - Namespaces
- C# - Preprocessor Directives
- C# - Regular Expressions
- C# - Exception Handling
- C# - File I/O
- C# Advanced Tutorial
- C# - Attributes
- C# - Reflection
- C# - Properties
- C# - Indexers
- C# - Delegates
- C# - Events
- C# - Collections
- C# - Generics
- C# - Anonymous Methods
- C# - Unsafe Codes
- C# - Multithreading
- C# Useful Resources
- C# - Questions and Answers
- C# - Quick Guide
- C# - Useful Resources
- C# - Discussion
What are the differences between a list collection and an array in C#?
List collection is a generic class and can store any data types to create a list. To define a List −
List<string> l = new List<string>();
To set elements in a list, you need to use the Add method.
l.Add("One"); l.Add("Two"); l.Add("Three");
An array stores a fixed-size sequential collection of elements of the same type.
To define Arrays −
int[] arr = new int[5];
To initialize and set elements to Arrays −
int[] arr = new int[5] {4, 8,5};
- Related Articles
- What are the differences between a dictionary and an array in C#?
- What are the differences between a multi-dimensional array and jagged array?
- What are the differences between a class and an interface in Java?
- What are the differences between Python and an Anaconda?
- What are the differences between an Integer and an int in Java?
- What are the differences between an application and an applet in Java?
- Differences between Collection and Collections in Java?
- What is the difference between a list and an array in C#?
- What is the difference between a python list and an array?
- What are differences between a gated community and an apartment?
- What are the differences between list, sequence and slice data types in Python?
- How to copy a List collection to an array?
- What are the differences between Zygote and a Foetus?
- What are the Differences Between a Team and a Group?
- What are the differences between a mixture and a solution?

Advertisements