标签:length logs ons ++ 字符串 初始化 log write class
int[] nums = { 12,13,14,15,16,17,18}; //初始化字符串 int length = Convert.ToInt32(nums.Length);//转化 //Console.WriteLine(length); length=7 string[] str = new string[length]; for (int i = 0; i < str.Length; i++) { str[i] = Convert.ToString(nums[i]); } //输出新数组 Console.Write("新数组是:"); for (int i = 0; i < str.Length; i++) { Console.Write(" "+str[i]); } Console.WriteLine();
标签:length logs ons ++ 字符串 初始化 log write class
原文地址:http://www.cnblogs.com/luluit/p/6400531.html