1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
FileStream fs = File.OpenRead(filePath);
 
MemoryStream ms = new MemoryStream();
ms.SetLength(fs.Length);
 
fs.Read(ms.GetBuffer(), 0, (int)ms.Length);
fs.Close();
             
 
fs = File.OpenWrite(filePath + ".bak");
ms.WriteTo(fs);
 
fs.Close();
ms.Close();
fs = null; ms = null;

Posted by lI헐헐Il
,