/// <summary> /// Retrieves the file name without the extension in a given string. /// </summary> /// <remarks> /// Examples: /// "C:\Team\Text\Test.Txt" would return "Test". /// "C:\Team\Text\Test" would also return "Test". /// </remarks> public static string GetNameWithoutExtension( string path) { return(string.IsNullOrEmpty(path) ? path : ZlpPathHelper.GetFileNameWithoutExtension(path)); }