@@ -602,7 +602,7 @@ internal static string GetConfigurationNameFromGroupPolicy()
602602 /// </returns>
603603 private ( string switchKey , bool shouldBreak ) GetSwitchKey ( string [ ] args , ref int argIndex , ref bool noexitSeen )
604604 {
605- string switchKey = args [ argIndex ] . Trim ( ) . ToLowerInvariant ( ) ;
605+ string switchKey = args [ argIndex ] . Trim ( ) ;
606606 if ( string . IsNullOrEmpty ( switchKey ) )
607607 {
608608 return ( switchKey : string . Empty , shouldBreak : false ) ;
@@ -648,7 +648,7 @@ private static bool MatchSwitch(string switchKey, string match, string smallestU
648648 Dbg . Assert ( match . Contains ( smallestUnambiguousMatch ) , "sUM should be a substring of match" ) ;
649649
650650 return ( switchKey . Length >= smallestUnambiguousMatch . Length
651- && match . IndexOf ( switchKey , StringComparison . Ordinal ) == 0 ) ;
651+ && match . StartsWith ( switchKey , StringComparison . OrdinalIgnoreCase ) ) ;
652652 }
653653
654654 #endregion
@@ -1131,11 +1131,11 @@ static object ConvertToBoolIfPossible(string arg)
11311131 {
11321132 if ( args [ i ] . StartsWith ( '-' ) && args [ i ] . Length > 1 )
11331133 {
1134- string param = args [ i ] . Substring ( 1 , args [ i ] . Length - 1 ) . ToLower ( ) ;
1134+ string param = args [ i ] . Substring ( 1 , args [ i ] . Length - 1 ) ;
11351135 StringBuilder possibleParameters = new StringBuilder ( ) ;
11361136 foreach ( string validParameter in s_validParameters )
11371137 {
1138- if ( validParameter . Contains ( param ) )
1138+ if ( validParameter . Contains ( param , StringComparison . OrdinalIgnoreCase ) )
11391139 {
11401140 possibleParameters . Append ( "\n -" ) ;
11411141 possibleParameters . Append ( validParameter ) ;
0 commit comments