Programming

(C#) How do I open an already opened file with a .net StreamReader?

steloflute 2012. 5. 28. 09:33

http://stackoverflow.com/questions/897796/how-do-i-open-an-already-opened-file-with-a-net-streamreader 

 

 using (Stream s = new FileStream(fullFilePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite)) { ... }

or,

using (Stream s = System.IO.File.Open(fullFilePath,  
                                      FileMode.Open,  
                                      FileAccess.Read,  
                                      FileShare.ReadWrite)) 
{ 
}