On Friday, 22 January 2016 at 06:53:29 UTC, mzfhhhh wrote:
D code:
auto arr = ["b1=1", "b=2","a1=1", "a=2"];
writeln(arr.sort());

output:["a1=1", "a=2", "b1=1", "b=2"]

C# code:
var arr = new string[]{ "b1=1", "b=2", "a1=1", "a=2" };
Array.Sort(arr);

output:["a=2","a1=1","b=2","b1=1"]

I don't what string sorting criteria is using C#, but '9' < '=', so should be ["a1=1", "a=2", "b1=1", "b=2"]

Reply via email to