110,539
社区成员
发帖
与我相关
我的任务
分享
public static bool getBytesOfFile(string path, byte[] file)
{
bool flag = false;
try
{
FileStream fs;
FileInfo fi = new FileInfo(path);
fs = fi.OpenWrite();
fs.Write(file, 0, file.Length);
fs.Close();
flag = true;
}
catch (Exception ce)
{
XtraMessageBox.Show(ce.Message,"提示",MessageBoxButtons.OK,MessageBoxIcon.Error);
}
return flag;
}
类似这样的代码.