/// <summary> /// Sort an string array /// </summary> /// <param name="stringArray">String array</param> /// <returns></returns> public static string[] Sort(string[] stringArray) { if (stringArray == null) return null; FileLogicalComparer fc = new FileLogicalComparer(); fc.AddFiles(stringArray); ArrayList ds = fc.GetSorted(); if (ds == null) return stringArray; for (int i = 0; i < ds.Count; i++) { stringArray[i] = (string)((DictionaryEntry)ds[i]).Value; } return stringArray; }
/// <summary> /// Sort an string array /// </summary> /// <param name="stringArray">String array</param> /// <returns></returns> public static string[] Sort(string[] stringArray) { if (stringArray == null) { return(null); } FileLogicalComparer fc = new FileLogicalComparer(); fc.AddFiles(stringArray); ArrayList ds = fc.GetSorted(); if (ds == null) { return(stringArray); } for (int i = 0; i < ds.Count; i++) { stringArray[i] = (string)((DictionaryEntry)ds[i]).Value; } return(stringArray); }