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 + ); } } }