Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - What is the difference between array, array and array list in c#
What is the difference between array, array and array list in c#
C# arrays are arrays, and arrays are arrays.

When defining an array, you need to specify the type, whether it is a string or an integer, so you don't need arraylist. It can store any type of variable.

The size of the array has been determined at initialization and cannot be changed. Arraylist can be increased or decreased, which is more flexible to use and simpler to operate. As the first floor said, the efficiency will be lower. If you can determine the type and quantity of storage, it is recommended to use array, otherwise use arraylist. I hope I can help you.