日期:2014-05-18 浏览次数:20958 次
int column = 5; string[] lines = File.ReadAllLines(@"E:\a.txt"); string[] result = new string[lines.Length * column]; for (int i = 0; i < lines.Length; i++) { string[] arr = Array.ConvertAll(lines[i].ToCharArray(), v1 => v1.ToString()); for (int j = 0; j < column; j++) { result[j * lines.Length + i] = arr[j]; } }