111,126
社区成员
发帖
与我相关
我的任务
分享
using System;
using System.IO;
class MyClass
{
public static void Main()
{
string[] textArr = File.ReadAllLines("error.txt");
if (textArr.Length > 0)
{
string result = textArr[textArr.Length - 1];
Console.WriteLine(result);
}
}
}
string[] textArr = File.ReadAllLines("d:\\error.txt");
if (textArr.Length > 0)
{
string result = textArr[textArr.Length - 1];
}
string text = File.ReadAllText("d:\\error.txt");