C#用变量定义数组大小

C#中我们很多时候用System.Collections.Generic.List<T>  和 System.Collections.Generic.Dictionary<TKey,TValue> 更方便。但是,有时我们还是要用数组的。

用变量定义数组大小:

// 用变量定义数组大小
int n = 10;
int[] array1;
array1 
= new int[n];
原文地址:https://www.cnblogs.com/anjou/p/1436387.html