From e705d9a82b1df880d8a5bb55336771086dfc2341 Mon Sep 17 00:00:00 2001 From: David Kudera Date: Thu, 30 Nov 2023 11:42:46 +0100 Subject: [PATCH] Sort usings with Ordinal culture (#1051) (#1052) --- Src/CSharpier/SyntaxPrinter/UsingDirectives.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Src/CSharpier/SyntaxPrinter/UsingDirectives.cs b/Src/CSharpier/SyntaxPrinter/UsingDirectives.cs index 2406b53a3..3624699aa 100644 --- a/Src/CSharpier/SyntaxPrinter/UsingDirectives.cs +++ b/Src/CSharpier/SyntaxPrinter/UsingDirectives.cs @@ -280,10 +280,18 @@ public int Compare(UsingDirectiveSyntax? x, UsingDirectiveSyntax? y) if (x.Alias is not null && y.Alias is not null) { - return x.Alias.ToFullString().CompareTo(y.Alias.ToFullString()); + return String.Compare( + x.Alias.ToFullString(), + y.Alias.ToFullString(), + StringComparison.Ordinal + ); } - return x.Name.ToFullString().CompareTo(y.Name.ToFullString()); + return String.Compare( + x.Name.ToFullString(), + y.Name.ToFullString(), + StringComparison.Ordinal + ); } } }