提交当前本机整理版本

This commit is contained in:
cyf
2026-07-02 10:11:39 +00:00
parent c10a5d64c7
commit aacefa24f8
822 changed files with 196665 additions and 14263 deletions
+36 -1
View File
@@ -301,4 +301,39 @@ namespace Lskj.Util
}
else
{
returnMsg
returnMsg = "登录失败";
isDelete = false;
}
return isDelete;
}
/// <summary>
/// 文件转换为byte[]
/// </summary>
/// <param name="filePath"></param>
/// <returns></returns>
public static byte[] ConvertFileToBytes(string filePath)
{
byte[] bytContent = null;
FileStream fs = null;
BinaryReader br = null;
try
{
fs = new FileStream(filePath, System.IO.FileMode.Open);
}
catch (Exception)
{
throw;
}
finally
{
if (fs != null)
br = new BinaryReader((Stream)fs);
if (br != null)
bytContent = br.ReadBytes((Int32)fs.Length);
if (fs != null)
fs.Dispose();
}
return bytContent;
}
}
}