/// <summary> /// Files to string array. /// </summary> /// <param name="FileName">Name of the file.</param> /// <returns>System.String[].</returns> public static string[] FileToStringArray(string FileName) { string Text = TextIO.FileToString(FileName); if (Text.IndexOf(Environment.NewLine) < 0) { return(Split(Text, "\n")); } return(Split(Text, Environment.NewLine)); }
/// <summary> /// Files to object. /// </summary> /// <param name="FileName">Name of the file.</param> /// <param name="xObject">The x object.</param> /// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns> public static bool FileToObject(string FileName, ref object xObject) { try { string Serialized = TextIO.FileToString(FileName); return(StringToObject(Serialized, ref xObject)); } catch (Exception EX) { } return(false); }
/// <summary> /// Files to string array. /// </summary> /// <param name="FileName">Name of the file.</param> /// <param name="Split">The split.</param> /// <returns>System.String[].</returns> public static string[] FileToStringArray(string FileName, string Split) { string Text = TextIO.FileToString(FileName); return(Text.Split(new string[] { Split }, StringSplitOptions.RemoveEmptyEntries)); }