希望各位过了个好年。动态生成数组问题请教 如何实现:用户输入N个整数,则程序自动生成N个相应长度的整数数组?比如用户输入 13 25 9然后程序就自动生成3个长度分别为13 25 9的数组 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 int[] a = new int[13];int[] b = new int[25];int[] c = new int[9]; 假如你不需要保存数组原有的数据的话,直接使用new即可假如你需要保存数组原有数据的话,如果也要使用new方式的话,可以使用一个临时数组进行中转保存数据,要不就是用ArrayList,或者<List>一般人家都会使用ArrayList,或者<List> 新年好!int n = int.Parse(Console.ReadLine());int[] a = new int[n]; 3楼应该看看Array.Resize<>()的用法。 List<Array> list = new List<Array>();ArrayList item = new ArrayList(len);list.Add(item.ToArray(typeof(type)); 在学c#时的问题,望大家指点指点 C#怎么修改EXCEL列的类型 C#如何写jpg文件 如何根据字符传匹配来获得某个属性或调用某个方法? 关于google earth动态模型 (100分,解决了再贴帖另加100分,觉不食言)继续给分帖。lxrxyz(无忧十年)和CSTerry(Terry)请进 关于comBox的一个问题 winform CSC无法把.cs文件编译成DLL文件 不通过DataSource 如何给DataGrid 的DataGridBoolColumn列赋值?(在线等待中...) 如何将大量的SQL语句加到C#代码中执行 新手求助-关于VS2005 连接数据库和查询的问题
int[] b = new int[25];
int[] c = new int[9];
假如你需要保存数组原有数据的话,如果也要使用new方式的话,可以使用一个临时数组进行中转保存数据,要不就是用ArrayList,或者<List>
一般人家都会使用ArrayList,或者<List>
int[] a = new int[n];
ArrayList item = new ArrayList(len);
list.Add(item.ToArray(typeof(type));