public static string PadNumbers(string input) { return Regex.Replace(input, "[0-9]+", match => match.Value.PadLeft(10, '0')); }
string[] alphaNumericList = new string[] { "Field1", "Field11","Field2", "Field11","Field10", "Field1", "Field2", "Field11" }; var result = alphaNumericList.OrderBy(x => PadNumbers(x));
No comments:
Post a Comment