static string alphabeticallyOrderString(string lineholderX) { string tmpLength = ""; string[] stringSplit = Regex.Split(lineholderX, ","); Array.Sort(stringSplit); lineholderX = ""; for (int i = 0; i < stringSplit.Length; i++) { if (stringSplit[i] != "") { tmpLength = ""; lineholderX += tmpLength + stringSplit[i] + ","; } } char lastComma = ','; lineholderX = lineholderX.TrimEnd(lastComma); return lineholderX; }