Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions xml/System/String.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4105,7 +4105,13 @@ Examples of instantiating strings:
<summary>Returns a value indicating whether a specified character occurs within this string.</summary>
<returns>
<see langword="true" /> if the <paramref name="value" /> parameter occurs within this string; otherwise, <see langword="false" />.</returns>
<remarks>To be added.</remarks>
<remarks>
Copy link

@pgovind pgovind May 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is that remarks don't show in intellisense. If we want this to show up in VS, we should move this change up into the summary. I'm happy with the text itself though :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just copying Contains (string value). @BillWagner ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BillWagner could you help with that question?

<format type="text/markdown"><![CDATA[

## Remarks
This method performs an ordinal (case-sensitive and culture-insensitive) comparison.
]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="Contains">
Expand Down Expand Up @@ -4160,7 +4166,7 @@ Examples of instantiating strings:
## Remarks
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.

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.
**.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.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does writing .NET Framework only at the beginning make it seem like the ability exists only in .NET Framework and not in .NET core(when it actually does)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, I just copied this pattern. I defer to docs folks.


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