Skip to content

Commit ababeae

Browse files
authored
Update String.Contains (#4250)
1 parent 54bb4e2 commit ababeae

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

xml/System/String.xml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4105,7 +4105,13 @@ Examples of instantiating strings:
41054105
<summary>Returns a value indicating whether a specified character occurs within this string.</summary>
41064106
<returns>
41074107
<see langword="true" /> if the <paramref name="value" /> parameter occurs within this string; otherwise, <see langword="false" />.</returns>
4108-
<remarks>To be added.</remarks>
4108+
<remarks>
4109+
<format type="text/markdown"><![CDATA[
4110+
4111+
## Remarks
4112+
This method performs an ordinal (case-sensitive and culture-insensitive) comparison.
4113+
]]></format>
4114+
</remarks>
41094115
</Docs>
41104116
</Member>
41114117
<Member MemberName="Contains">
@@ -4160,7 +4166,7 @@ Examples of instantiating strings:
41604166
## Remarks
41614167
This method performs an ordinal (case-sensitive and culture-insensitive) comparison. The search begins at the first character position of this string and continues through the last character position.
41624168

4163-
To determine whether a string contains a specified substring by using something other than ordinal comparison (such as culture-sensitive comparison, or ordinal case-insensitive comparison), you can create a custom method. The following example illustrates one such approach. It defines a <xref:System.String> extension method that includes a <xref:System.StringComparison> parameter and indicates whether a string contains a substring when using the specified form of string comparison.
4169+
**.NET Framework only**: To determine whether a string contains a specified substring by using something other than ordinal comparison (such as culture-sensitive comparison, or ordinal case-insensitive comparison), you can create a custom method. The following example illustrates one such approach. It defines a <xref:System.String> extension method that includes a <xref:System.StringComparison> parameter and indicates whether a string contains a substring when using the specified form of string comparison.
41644170

41654171
[!code-csharp[System.String.Contains#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/System.String.Contains/cs/ContainsExt1.cs#1)]
41664172
[!code-vb[System.String.Contains#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/System.String.Contains/vb/ContainsExt1.vb#1)]

0 commit comments

Comments
 (0)