Array and List are elements present in most programming languages and are a very useful tool when you need to build a set of objects of the same type.


To declare an array in c#, add the square brackets after the type definition, and give a name to your variable.

when you declare an array, you are building a set of contiguous boxes ready to host a variable of the declared type for each of its boxes. In fact when you declare an array you allocate a precise space of memory.

It is also possible to create multidimensional arrays, just put a comma inside the brackets.


For lists to be declared ask to explicitly use the keyword List followed by the type in angle brackets and its name.

Lists are easier to manipulate, we can add elements at will. They don’t need a contiguous space between their elements because each element of a list is composed of the value of its variable and the element that points to the next value in the list.


In conclusion, they are two tools that you have to use according to the situation. Array memory is static and continuous. List memory is dynamic and random. Users do not need to keep track of the next memory with arrays. With lists, the user needs to keep track of the next location.

Array and List in the Unity Inspector are very similar

In Unity, both can be serialized and modified in the Inspector. And we can also create Arrays and Lists from classes we create as well as from primitive types.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store