var list = Enumerable.Range(1, 10).Select(i => i * 3).ToList(); list // => [3, 6, 9, 12, 15, 18, 21, 24, 27, 30] list.Sort((l, r) => l.ToString().CompareTo(r.ToString())); list // => [12, 15, 18, 21, 24, 27, 3, 30, 6, 9]
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter