I know that in the context of loops the equivalent of To in i = long1 To long2 in VB is (i = long1; i < long2; ++i) in C#, but I am trying to find a an equivalent of it in the context of ReDim/System.Array.Resize():
VB6:
ReDim indexCorr(LBound(fDefMatchs) to UBound(fDefMatchs)
C#:
System.Array.Resize(indexCorr, ***?)
Does anyone else know how to resize an array in C# using a range of numbers like this?
I think what you're looking for is this:
System.Array.Resize(ref indexCorr, fDefMatchs.Length);
However, in .NET you cannot set the lower bound of an array. From the documentation:
Arrays are zero indexed: an array with n elements is indexed from 0 to n-1.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With