The error is in the expression Array.Resize; more specifically, in the indicated size.
In VB.Net you specify the last index of the array, where in C # you specify the length of the array.
Thus, there is a shift of 1 between them.
ReDim .CurveData(.NumCurves - 1)
' equivalent to
ReDim .CurveData(0 To .NumCurves - 1) ' length is (.NumCurves - 1) - 0 + 1 = .NumCurves
This is due to the fact that in VB6 you can have an array indexed in a different base than 0 (in particular, 1 indexed set) and therefore it was valid ( it is not in VB.Net )
Dim someArray(-4 To 5) As Integer ' declares an array of 10 integer indexed from -4 to 5
,
Array.Resize(ref OutData.MeridData[0].CurveData, OutData.MeridData[0].NumCurves);
, ; ReDim ( , ReDim Array.Resize .Net)
:
answer Array.Resize - Redim Preserve not ReDim ( )