28 Mayıs 2018 Pazartesi

Işlem başka bir işlem tarafından kullanıldığından dosyasına erişemiyor Hatası ve Çözümü


using (System.IO.FileStream file = new System.IO.FileStream(path, System.IO.FileMode.OpenOrCreate, System.IO.FileAccess.ReadWrite, System.IO.FileShare.ReadWrite))
                    using (System.IO.StreamReader sr = new System.IO.StreamReader(file))
                    {
                        // Read the stream to a string, and write the string to the console.
                        string not = sr.ReadToEnd();
                    }