csharp using file.io
Code Example - csharp using file.io
using System.IO;
using (StreamReader reader = File.ReadAllText(path))
{
//now your file will be closed correctly,
// without having to call .close()
}