public string ReadAllText(string path, Encoding encoding) { string text = string.Empty; try { using (StreamReader sr = new StreamReader(path, encoding)) { text = sr.ReadToEnd(); } } catch { } return text; }