- int[] nums = { 1, 2, 3 };
- string[] strs = { "aa", "bb", "cc" };
- Console.WriteLine("{0},{1},{2}", nums[0], nums[1], nums[2]);
- Console.WriteLine("{0},{1},{2}", nums);//出现异常
- Console.WriteLine("{0},{1},{2}", strs[0], strs[1], strs[2]);
- Console.WriteLine("{0},{1},{2}", strs);
复制代码 |
|