+ 1
Arrays
Please tell me is there any difference between arrays in c and arrays in c#
2 Respostas
+ 1
Yes.
In C# arrays are objects.
In C there are no objects at all.
In C there is no bound checking for arrays.
C# throws exceptions if you try to access beyond array bounds.
There is difference in syntax.
Maybe some more differences. well, can you remove c++ from tags of this question? click 3 dots at top left corner and edit question.
+ 1
They are different object types. Arrays belong to System.Array namespace whereas Arraylist belongs to System.Collection namespaces .
Array is strongly typed . This means that an array can store only specific type of items\elements. As a result, it is type safe, and is also the most efficient, both in terms of memory and performance. While in arraylist, we can store all the datatype values.
Array stores fixed number of elements. Size of an Array must be specified at the time of initialization . ArrayList grows automatically and you don't need to specify size.