/// <summary>
/// 获取txt文件内容
/// </summary>
/// <param name="path"></param>
/// <returns></returns>
public static string GetContentByTxt(string path)
{
string conStr = "";
try
{
FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
StreamReader reader = new StreamReader(fs);
conStr = reader.ReadLine();
}
catch (Exception)
{
conStr = "";
}
return conStr;
}