Skip to content

Commit b3a3dbd

Browse files
committed
Switch to a recommendation of Ordinal
1 parent d256314 commit b3a3dbd

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

xml/System/String.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5287,7 +5287,7 @@ This method performs an ordinal (case-sensitive and culture-insensitive) compari
52875287
<exception cref="T:System.ArgumentNullException">
52885288
<paramref name="value" /> is <see langword="null" />.</exception>
52895289
<block subset="none" type="usage">
5290-
<para>As explained in [Best Practices for Using Strings](/dotnet/standard/base-types/best-practices-strings), we recommend that you avoid calling string comparison methods that substitute default values and instead call methods that require parameters to be explicitly specified. To determine whether a string ends with a particular substring by using the string comparison rules of the current culture, signal your intention explicitly by calling the <see cref="M:System.String.EndsWith(System.String,System.StringComparison)" /> method overload with a value of <see cref="F:System.StringComparison.CurrentCulture" /> for its <paramref name="comparisonType" /> parameter. Note that <see cref="F:System.StringComparison.InvariantCulture" /> is rarely appropriate.</para>
5290+
<para>As explained in [Best Practices for Using Strings](/dotnet/standard/base-types/best-practices-strings), we recommend that you avoid calling string comparison methods that substitute default values and instead call methods that require parameters to be explicitly specified. To determine whether a string ends with a particular substring by using the string comparison rules of the current culture, signal your intention explicitly by calling the <see cref="M:System.String.EndsWith(System.String,System.StringComparison)" /> method overload with a value of <see cref="F:System.StringComparison.CurrentCulture" /> for its <paramref name="comparisonType" /> parameter. If you don't need linguistic-aware comparison, consider using <see cref="F:System.StringComparison.Ordinal" />.</para>
52915291
</block>
52925292
<altmember cref="M:System.String.StartsWith(System.String)" />
52935293
<altmember cref="M:System.String.Compare(System.String,System.String)" />
@@ -8014,7 +8014,7 @@ The `GetPinnableReference` method returns a character that can be used for pinni
80148014
<exception cref="T:System.ArgumentNullException">
80158015
<paramref name="value" /> is <see langword="null" />.</exception>
80168016
<block subset="none" type="usage">
8017-
<para>As explained in [Best Practices for Using Strings](/dotnet/standard/base-types/best-practices-strings), we recommend that you avoid calling string comparison methods that substitute default values and instead call methods that require parameters to be explicitly specified. To find the first index of a substring within a string instance by using the comparison rules of the current culture, signal your intention explicitly by calling the <see cref="M:System.String.IndexOf(System.String,System.StringComparison)" /> method overload with a value of <see cref="F:System.StringComparison.CurrentCulture" /> for its `comparisonType` parameter. Note that <see cref="F:System.StringComparison.InvariantCulture" /> is rarely appropriate.</para>
8017+
<para>As explained in [Best Practices for Using Strings](/dotnet/standard/base-types/best-practices-strings), we recommend that you avoid calling string comparison methods that substitute default values and instead call methods that require parameters to be explicitly specified. To find the first index of a substring within a string instance by using the comparison rules of the current culture, signal your intention explicitly by calling the <see cref="M:System.String.IndexOf(System.String,System.StringComparison)" /> method overload with a value of <see cref="F:System.StringComparison.CurrentCulture" /> for its `comparisonType` parameter. If you don't need linguistic-aware comparison, consider using <see cref="F:System.StringComparison.Ordinal" />.</para>
80188018
</block>
80198019
<altmember cref="T:System.Int32" />
80208020
<altmember cref="T:System.Globalization.CultureInfo" />
@@ -8230,7 +8230,7 @@ The `comparisonType` parameter is a <xref:System.StringComparison> enumeration m
82308230
<exception cref="T:System.ArgumentOutOfRangeException">
82318231
<paramref name="startIndex" /> is less than 0 (zero) or greater than the length of this string.</exception>
82328232
<block subset="none" type="usage">
8233-
<para>As explained in [Best Practices for Using Strings](/dotnet/standard/base-types/best-practices-strings), we recommend that you avoid calling string comparison methods that substitute default values and instead call methods that require parameters to be explicitly specified. To find the first index of a substring that occurs after a particular character position by using the comparison rules of the current culture, signal your intention explicitly by calling the <see cref="M:System.String.IndexOf(System.String,System.Int32,System.StringComparison)" /> method overload with a value of <see cref="F:System.StringComparison.CurrentCulture" /> for its `comparisonType` parameter. Note that <see cref="F:System.StringComparison.InvariantCulture" /> is rarely appropriate.</para>
8233+
<para>As explained in [Best Practices for Using Strings](/dotnet/standard/base-types/best-practices-strings), we recommend that you avoid calling string comparison methods that substitute default values and instead call methods that require parameters to be explicitly specified. To find the first index of a substring that occurs after a particular character position by using the comparison rules of the current culture, signal your intention explicitly by calling the <see cref="M:System.String.IndexOf(System.String,System.Int32,System.StringComparison)" /> method overload with a value of <see cref="F:System.StringComparison.CurrentCulture" /> for its `comparisonType` parameter. If you don't need linguistic-aware comparison, consider using <see cref="F:System.StringComparison.Ordinal" />.</para>
82348234
</block>
82358235
<altmember cref="T:System.Int32" />
82368236
<altmember cref="T:System.Globalization.CultureInfo" />
@@ -8502,7 +8502,7 @@ The `comparisonType` parameter is a <xref:System.StringComparison> enumeration m
85028502

85038503
<paramref name="count" /> is greater than the length of this string minus <paramref name="startIndex" />.</exception>
85048504
<block subset="none" type="usage">
8505-
<para>As explained in [Best Practices for Using Strings](/dotnet/standard/base-types/best-practices-strings), we recommend that you avoid calling string comparison methods that substitute default values and instead call methods that require parameters to be explicitly specified. To use the comparison rules of the current culture to perform this operation, signal your intention explicitly by calling the <see cref="M:System.String.IndexOf(System.String,System.Int32,System.Int32,System.StringComparison)" /> method overload with a value of <see cref="F:System.StringComparison.CurrentCulture" /> for its `comparisonType` parameter. Note that <see cref="F:System.StringComparison.InvariantCulture" /> is rarely appropriate.</para>
8505+
<para>As explained in [Best Practices for Using Strings](/dotnet/standard/base-types/best-practices-strings), we recommend that you avoid calling string comparison methods that substitute default values and instead call methods that require parameters to be explicitly specified. To use the comparison rules of the current culture to perform this operation, signal your intention explicitly by calling the <see cref="M:System.String.IndexOf(System.String,System.Int32,System.Int32,System.StringComparison)" /> method overload with a value of <see cref="F:System.StringComparison.CurrentCulture" /> for its `comparisonType` parameter. If you don't need linguistic-aware comparison, consider using <see cref="F:System.StringComparison.Ordinal" />.</para>
85068506
</block>
85078507
<altmember cref="T:System.Int32" />
85088508
<altmember cref="T:System.Globalization.CultureInfo" />
@@ -10501,7 +10501,7 @@ In the following example, the <xref:System.String.LastIndexOf%28System.String%29
1050110501
<exception cref="T:System.ArgumentNullException">
1050210502
<paramref name="value" /> is <see langword="null" />.</exception>
1050310503
<block subset="none" type="usage">
10504-
<para>As explained in [Best Practices for Using Strings](/dotnet/standard/base-types/best-practices-strings), we recommend that you avoid calling string comparison methods that substitute default values and instead call methods that require parameters to be explicitly specified. To find the last index of a substring within a string instance by using the comparison rules of the current culture, signal your intention explicitly by calling the <see cref="M:System.String.LastIndexOf(System.String,System.StringComparison)" /> method overload with a value of <see cref="F:System.StringComparison.CurrentCulture" /> for its <paramref name="comparisonType" /> parameter. Note that <see cref="F:System.StringComparison.InvariantCulture" /> is rarely appropriate.</para>
10504+
<para>As explained in [Best Practices for Using Strings](/dotnet/standard/base-types/best-practices-strings), we recommend that you avoid calling string comparison methods that substitute default values and instead call methods that require parameters to be explicitly specified. To find the last index of a substring within a string instance by using the comparison rules of the current culture, signal your intention explicitly by calling the <see cref="M:System.String.LastIndexOf(System.String,System.StringComparison)" /> method overload with a value of <see cref="F:System.StringComparison.CurrentCulture" /> for its <paramref name="comparisonType" /> parameter. If you don't need linguistic-aware comparison, consider using <see cref="F:System.StringComparison.Ordinal" />.</para>
1050510505
</block>
1050610506
<altmember cref="T:System.Int32" />
1050710507
<altmember cref="M:System.String.IndexOf(System.Char)" />
@@ -10661,7 +10661,7 @@ In the following example, the <xref:System.String.LastIndexOf%28System.String%29
1066110661

1066210662
The current instance equals <see cref="F:System.String.Empty" />, and <paramref name="startIndex" /> is less than -1 or greater than zero.</exception>
1066310663
<block subset="none" type="usage">
10664-
<para>As explained in [Best Practices for Using Strings](/dotnet/standard/base-types/best-practices-strings), we recommend that you avoid calling string comparison methods that substitute default values and instead call methods that require parameters to be explicitly specified. To find the index of a substring that precedes a particular character position by using the comparison rules of the current culture, signal your intention explicitly by calling the <see cref="M:System.String.LastIndexOf(System.String,System.Int32,System.StringComparison)" /> method overload with a value of <see cref="F:System.StringComparison.CurrentCulture" /> for its <paramref name="comparisonType" /> parameter. Note that <see cref="F:System.StringComparison.InvariantCulture" /> is rarely appropriate.</para>
10664+
<para>As explained in [Best Practices for Using Strings](/dotnet/standard/base-types/best-practices-strings), we recommend that you avoid calling string comparison methods that substitute default values and instead call methods that require parameters to be explicitly specified. To find the index of a substring that precedes a particular character position by using the comparison rules of the current culture, signal your intention explicitly by calling the <see cref="M:System.String.LastIndexOf(System.String,System.Int32,System.StringComparison)" /> method overload with a value of <see cref="F:System.StringComparison.CurrentCulture" /> for its <paramref name="comparisonType" /> parameter. If you don't need linguistic-aware comparison, consider using <see cref="F:System.StringComparison.Ordinal" />.</para>
1066510665
</block>
1066610666
<altmember cref="T:System.Int32" />
1066710667
<altmember cref="M:System.String.IndexOf(System.Char)" />
@@ -10950,7 +10950,7 @@ In the following example, the <xref:System.String.LastIndexOf%2A> method is used
1095010950

1095110951
The current instance equals <see cref="F:System.String.Empty" /> and <paramref name="count" /> is greater than 1.</exception>
1095210952
<block subset="none" type="usage">
10953-
<para>As explained in [Best Practices for Using Strings](/dotnet/standard/base-types/best-practices-strings), we recommend that you avoid calling string comparison methods that substitute default values and instead call methods that require parameters to be explicitly specified. To perform this operation by using the comparison rules of the current culture, signal your intention explicitly by calling the <see cref="M:System.String.LastIndexOf(System.String,System.Int32,System.Int32,System.StringComparison)" /> method overload with a value of <see cref="F:System.StringComparison.CurrentCulture" /> for its <paramref name="comparisonType" /> parameter. Note that <see cref="F:System.StringComparison.InvariantCulture" /> is rarely appropriate.</para>
10953+
<para>As explained in [Best Practices for Using Strings](/dotnet/standard/base-types/best-practices-strings), we recommend that you avoid calling string comparison methods that substitute default values and instead call methods that require parameters to be explicitly specified. To perform this operation by using the comparison rules of the current culture, signal your intention explicitly by calling the <see cref="M:System.String.LastIndexOf(System.String,System.Int32,System.Int32,System.StringComparison)" /> method overload with a value of <see cref="F:System.StringComparison.CurrentCulture" /> for its <paramref name="comparisonType" /> parameter. If you don't need linguistic-aware comparison, consider using <see cref="F:System.StringComparison.Ordinal" />.</para>
1095410954
</block>
1095510955
<altmember cref="T:System.Int32" />
1095610956
<altmember cref="M:System.String.IndexOf(System.Char)" />
@@ -13929,7 +13929,7 @@ The following example defines a `StripStartTags` method that uses the <xref:Syst
1392913929
<exception cref="T:System.ArgumentNullException">
1393013930
<paramref name="value" /> is <see langword="null" />.</exception>
1393113931
<block subset="none" type="usage">
13932-
<para>As explained in [Best Practices for Using Strings](/dotnet/standard/base-types/best-practices-strings), we recommend that you avoid calling string comparison methods that substitute default values and instead call methods that require parameters to be explicitly specified. To determine whether a string begins with a particular substring by using the string comparison rules of the current culture, signal your intention explicitly by calling the <see cref="M:System.String.StartsWith(System.String,System.StringComparison)" /> method overload with a value of <see cref="F:System.StringComparison.CurrentCulture" /> for its <paramref name="comparisonType" /> parameter. Note that <see cref="F:System.StringComparison.InvariantCulture" /> is rarely appropriate.</para>
13932+
<para>As explained in [Best Practices for Using Strings](/dotnet/standard/base-types/best-practices-strings), we recommend that you avoid calling string comparison methods that substitute default values and instead call methods that require parameters to be explicitly specified. To determine whether a string begins with a particular substring by using the string comparison rules of the current culture, signal your intention explicitly by calling the <see cref="M:System.String.StartsWith(System.String,System.StringComparison)" /> method overload with a value of <see cref="F:System.StringComparison.CurrentCulture" /> for its <paramref name="comparisonType" /> parameter. If you don't need linguistic-aware comparison, consider using <see cref="F:System.StringComparison.Ordinal" />.</para>
1393313933
</block>
1393413934
<altmember cref="M:System.String.EndsWith(System.String)" />
1393513935
</Docs>
@@ -15953,7 +15953,7 @@ This member is an explicit interface member implementation. It can be used only
1595315953
]]></format>
1595415954
</remarks>
1595515955
<block subset="none" type="usage">
15956-
<para>As explained in [Best Practices for Using Strings](/dotnet/standard/base-types/best-practices-strings), we recommend that you avoid calling string casing methods that substitute default values and instead call methods that require parameters to be explicitly specified. To convert a character to lowercase by using the casing conventions of the current culture, signal your intention explicitly by calling the <see cref="M:System.String.ToLower(System.Globalization.CultureInfo)" /> method overload with a value of <see cref="P:System.Globalization.CultureInfo.CurrentCulture" /> for its <paramref name="culture" /> parameter. Note that <see cref="F:System.StringComparison.InvariantCulture" /> is rarely appropriate.</para>
15956+
<para>As explained in [Best Practices for Using Strings](/dotnet/standard/base-types/best-practices-strings), we recommend that you avoid calling string casing methods that substitute default values and instead call methods that require parameters to be explicitly specified. To convert a character to lowercase by using the casing conventions of the current culture, signal your intention explicitly by calling the <see cref="M:System.String.ToLower(System.Globalization.CultureInfo)" /> method overload with a value of <see cref="P:System.Globalization.CultureInfo.CurrentCulture" /> for its <paramref name="culture" /> parameter. If you don't need linguistic-aware comparison, consider using <see cref="F:System.StringComparison.Ordinal" />.</para>
1595715957
</block>
1595815958
<altmember cref="M:System.String.ToLowerInvariant" />
1595915959
<altmember cref="M:System.String.ToUpper" />
@@ -16342,7 +16342,7 @@ This member is an explicit interface member implementation. It can be used only
1634216342
]]></format>
1634316343
</remarks>
1634416344
<block subset="none" type="usage">
16345-
<para>As explained in [Best Practices for Using Strings](/dotnet/standard/base-types/best-practices-strings), we recommend that you avoid calling string casing methods that substitute default values and instead call methods that require parameters to be explicitly specified. To convert a string to uppercase by using the casing conventions of the current culture, signal your intention explicitly by calling the <see cref="M:System.String.ToUpper(System.Globalization.CultureInfo)" /> method overload with a value of <see cref="P:System.Globalization.CultureInfo.CurrentCulture" /> for its <paramref name="culture" /> parameter. Note that <see cref="F:System.StringComparison.InvariantCulture" /> is rarely appropriate.</para>
16345+
<para>As explained in [Best Practices for Using Strings](/dotnet/standard/base-types/best-practices-strings), we recommend that you avoid calling string casing methods that substitute default values and instead call methods that require parameters to be explicitly specified. To convert a string to uppercase by using the casing conventions of the current culture, signal your intention explicitly by calling the <see cref="M:System.String.ToUpper(System.Globalization.CultureInfo)" /> method overload with a value of <see cref="P:System.Globalization.CultureInfo.CurrentCulture" /> for its <paramref name="culture" /> parameter. If you don't need linguistic-aware comparison, consider using <see cref="F:System.StringComparison.Ordinal" />.</para>
1634616346
</block>
1634716347
<altmember cref="M:System.String.ToLower" />
1634816348
<altmember cref="M:System.String.ToLowerInvariant" />

0 commit comments

Comments
 (0)