public static bool AllTextToFile(string filepath, string text) { try { File.WriteAllText(filepath, text); } catch (Exception ex) { return false; } return true; }