public void WriteToFile(string path) { using (FileStream fs = File.Open(path, FileMode.Open, FileAccess.Read, FileShare.Read)) WriteToStream(fs); }