@@ -395,10 +395,10 @@ public static int Compare(String strA, String strB, StringComparison comparisonT
395395 return CultureInfo . CurrentCulture . CompareInfo . Compare ( strA , strB , CompareOptions . IgnoreCase ) ;
396396
397397 case StringComparison . InvariantCulture :
398- return CultureInfo . InvariantCulture . CompareInfo . Compare ( strA , strB , CompareOptions . None ) ;
398+ return CompareInfo . Invariant . Compare ( strA , strB , CompareOptions . None ) ;
399399
400400 case StringComparison . InvariantCultureIgnoreCase :
401- return CultureInfo . InvariantCulture . CompareInfo . Compare ( strA , strB , CompareOptions . IgnoreCase ) ;
401+ return CompareInfo . Invariant . Compare ( strA , strB , CompareOptions . IgnoreCase ) ;
402402
403403 case StringComparison . Ordinal :
404404 // Most common case: first character is different.
@@ -592,10 +592,10 @@ public static int Compare(String strA, int indexA, String strB, int indexB, int
592592 return CultureInfo. CurrentCulture . CompareInfo . Compare ( strA , indexA , lengthA , strB , indexB , lengthB , CompareOptions . IgnoreCase ) ;
593593
594594 case StringComparison. InvariantCulture :
595- return CultureInfo . InvariantCulture . CompareInfo . Compare ( strA , indexA , lengthA , strB , indexB , lengthB , CompareOptions . None ) ;
595+ return CompareInfo. Invariant . Compare ( strA , indexA , lengthA , strB , indexB , lengthB , CompareOptions . None ) ;
596596
597597 case StringComparison. InvariantCultureIgnoreCase :
598- return CultureInfo . InvariantCulture . CompareInfo . Compare ( strA , indexA , lengthA , strB , indexB , lengthB , CompareOptions . IgnoreCase ) ;
598+ return CompareInfo. Invariant . Compare ( strA , indexA , lengthA , strB , indexB , lengthB , CompareOptions . IgnoreCase ) ;
599599
600600 case StringComparison. Ordinal :
601601 return CompareOrdinalHelper( strA , indexA , lengthA , strB , indexB , lengthB ) ;
@@ -771,10 +771,10 @@ public Boolean EndsWith(String value, StringComparison comparisonType)
771771 return CultureInfo. CurrentCulture . CompareInfo . IsSuffix ( this , value , CompareOptions . IgnoreCase ) ;
772772
773773 case StringComparison. InvariantCulture :
774- return CultureInfo . InvariantCulture . CompareInfo . IsSuffix ( this , value , CompareOptions . None ) ;
774+ return CompareInfo. Invariant . IsSuffix ( this , value , CompareOptions . None ) ;
775775
776776 case StringComparison. InvariantCultureIgnoreCase :
777- return CultureInfo . InvariantCulture . CompareInfo . IsSuffix ( this , value , CompareOptions . IgnoreCase ) ;
777+ return CompareInfo. Invariant . IsSuffix ( this , value , CompareOptions . IgnoreCase ) ;
778778
779779 case StringComparison. Ordinal :
780780 return this . Length < value . Length ? false : ( CompareOrdinalHelper ( this , this . Length - value . Length , value . Length , value , 0 , value . Length ) == 0 ) ;
@@ -867,10 +867,10 @@ public bool Equals(String value, StringComparison comparisonType)
867867 return ( CultureInfo . CurrentCulture . CompareInfo . Compare ( this , value , CompareOptions . IgnoreCase ) == 0 ) ;
868868
869869 case StringComparison. InvariantCulture :
870- return ( CultureInfo . InvariantCulture . CompareInfo . Compare ( this , value , CompareOptions . None ) == 0 ) ;
870+ return ( CompareInfo . Invariant . Compare ( this , value , CompareOptions . None ) == 0 ) ;
871871
872872 case StringComparison. InvariantCultureIgnoreCase :
873- return ( CultureInfo . InvariantCulture . CompareInfo . Compare ( this , value , CompareOptions . IgnoreCase ) == 0 ) ;
873+ return ( CompareInfo . Invariant . Compare ( this , value , CompareOptions . IgnoreCase ) == 0 ) ;
874874
875875 case StringComparison. Ordinal :
876876 if ( this . Length != value . Length )
@@ -935,10 +935,10 @@ public static bool Equals(String a, String b, StringComparison comparisonType)
935935 return ( CultureInfo . CurrentCulture . CompareInfo . Compare ( a , b , CompareOptions . IgnoreCase ) == 0 ) ;
936936
937937 case StringComparison. InvariantCulture :
938- return ( CultureInfo . InvariantCulture . CompareInfo . Compare ( a , b , CompareOptions . None ) == 0 ) ;
938+ return ( CompareInfo . Invariant . Compare ( a , b , CompareOptions . None ) == 0 ) ;
939939
940940 case StringComparison. InvariantCultureIgnoreCase :
941- return ( CultureInfo . InvariantCulture . CompareInfo . Compare ( a , b , CompareOptions . IgnoreCase ) == 0 ) ;
941+ return ( CompareInfo . Invariant . Compare ( a , b , CompareOptions . IgnoreCase ) == 0 ) ;
942942
943943 case StringComparison. Ordinal :
944944 if ( a . Length != b . Length )
@@ -1090,10 +1090,10 @@ public Boolean StartsWith(String value, StringComparison comparisonType)
10901090 return CultureInfo . CurrentCulture . CompareInfo . IsPrefix ( this , value , CompareOptions . IgnoreCase ) ;
10911091
10921092 case StringComparison . InvariantCulture :
1093- return CultureInfo . InvariantCulture . CompareInfo . IsPrefix ( this , value , CompareOptions . None ) ;
1093+ return CompareInfo . Invariant . IsPrefix ( this , value , CompareOptions . None ) ;
10941094
10951095 case StringComparison . InvariantCultureIgnoreCase :
1096- return CultureInfo . InvariantCulture . CompareInfo . IsPrefix ( this , value , CompareOptions . IgnoreCase ) ;
1096+ return CompareInfo . Invariant . IsPrefix ( this , value , CompareOptions . IgnoreCase ) ;
10971097
10981098 case StringComparison . Ordinal :
10991099 if ( this . Length < value . Length || _firstChar != value . _firstChar )
0 commit comments