diff options
author | Marek Safar <marek.safar@gmail.com> | 2013-07-26 21:48:50 +0400 |
---|---|---|
committer | Duncan Mak <duncan.mak@xamarin.com> | 2013-07-29 21:19:36 +0400 |
commit | e82c956b2799859f82140bde2b72a0080c5a3f95 (patch) | |
tree | c63dda55b42b2bc0ced8d662eb716746d6bef325 /mcs | |
parent | 675bb0fa6c21aa0c1deda11cc2d509e944ac2b0b (diff) |
Remove CultureInfo.CurrentCulture dependency from ordinal based string::EndsWith. Fixes #13509
Diffstat (limited to 'mcs')
-rw-r--r-- | mcs/class/corlib/System/String.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mcs/class/corlib/System/String.cs b/mcs/class/corlib/System/String.cs index 4c8ea8d7481..d30735f9bdb 100644 --- a/mcs/class/corlib/System/String.cs +++ b/mcs/class/corlib/System/String.cs @@ -1694,9 +1694,9 @@ namespace System case StringComparison.InvariantCultureIgnoreCase: return CultureInfo.InvariantCulture.CompareInfo.IsSuffix (this, value, CompareOptions.IgnoreCase); case StringComparison.Ordinal: - return CultureInfo.CurrentCulture.CompareInfo.IsSuffix (this, value, CompareOptions.Ordinal); + return CultureInfo.InvariantCulture.CompareInfo.IsSuffix (this, value, CompareOptions.Ordinal); case StringComparison.OrdinalIgnoreCase: - return CultureInfo.CurrentCulture.CompareInfo.IsSuffix (this, value, CompareOptions.OrdinalIgnoreCase); + return CultureInfo.InvariantCulture.CompareInfo.IsSuffix (this, value, CompareOptions.OrdinalIgnoreCase); default: string msg = Locale.GetText ("Invalid value '{0}' for StringComparison", comparisonType); throw new ArgumentException (msg, "comparisonType"); |