For instance, in VB.NET:
Dim strArray(5) As String
As I understand it, because this is an array, the computer will allocate contiguous memory locations for each of the 5 elements. But how much space is allocated for each of the five elements? What if I decide to put a 5MB block of text in position 2 of the array?
Is it different for value types (e.g., an array of Int32)? I would think if it had to resize the block of memory for an individual element it would have to create a whole new array to preserve the contiguous memory feature.