VB:
Dim YourArray() As Integer
...
ReDim Preserve YourArray(i)
C#:
int[] YourArray;
...
int[] temp = new int[i + 1];
if (YourArray != null)
Array.Copy(YourArray, temp, Math.Min(YourArray.Length, temp.Length));
YourArray = temp;
- Dec 27 Mon 2010 23:53
-
C# VB的ReDim Preserve轉成C# record
請先 登入 以發表留言。