s
o
u
l
s
j
i
e

C# 将项目资源文件保存到磁盘上

描述:在项目资源中有个dll文件“资源名称.dll”,需要在程序运行后将“资源名称.dll”下载到D盘temp文件夹下

byte[] fileArr = Properties.Resources.资源名称; 
FileStream outputFile = new FileStream(@"D://temp/", FileMode.Create, FileAccess.Write); //存到磁盘
outputFile.Write(fileArr, 0, fileArr.Length);
outputFile.Close();
outputFile.Dispose();
posted @ 2022-12-12 10:36  soulsjie  阅读(112)  评论(0编辑  收藏  举报
你累吗?累就对了,当你觉得累时证明你在走上坡路!-----NotFoundObject - 2016-12-14 08:43