string x = string.Empty;
string[] lines = System.IO.File.ReadAllLines(@"C:\Documents and Settings\Administrator\桌面\2.txt",Encoding.Default);
if (lines != null) {
for (int i = 0; i < lines.Length; i++) {
string a = lines[i];
string[] b = a.Split(new char[]{‘ ‘},StringSplitOptions.RemoveEmptyEntries);
foreach (string c in b) {
Console.WriteLine(c);
}
}
Console.ReadKey();
时间: 2024-10-13 22:56:41