有人能告訴我什麼權限和文件共享OpenRead方法讀取文件。FileStream stream = File.OpenRead(FileName);
我想這個代碼,
FileStream stream = File.OpenRead(FileName);
但被建議使用此代碼,
var stream = File.Open(path, FileMode.Open, FileAccess.Read, FileShare.Read);
所以我的問題是,什麼File.OpenRead()默認使用的,如果我不」 t提供其他參數。
我不能只是更改生產服務器上的代碼。
當它是有據可查[這裏]爲什麼反編譯(HTTP:// MSDN .microsoft.com/en-us/library/system.io.file.openread.aspx) –
更快:-),否? – Thomas
當然,是的:) –