1D
array<int>^ a1 = {1,2,3,4,5};
array<int>^ a1 = gcnew array<int>(ARRAY_SIZE);
2D
array< int , 2 >^ local = gcnew array< int, 2 >(ARRAY_SIZE, ARRAY_SIZE);
Reference:
Declaration of a CLR Array
http://msdn.microsoft.com/en-us/library/ms235236%28VS.80%29.aspx
How to: Create Multidimension Arrays
http://msdn.microsoft.com/en-us/library/2xfh4c7d%28VS.80%29.aspx
宣告一個二維陣列
http://social.msdn.microsoft.com/Forums/zh-TW/215bb670-eee8-4bf1-adb2-824519902a26
沒有留言:
張貼留言