Skip to content

Commit d137e80

Browse files
authored
Fixes to system.string (#4058)
* fix return value formatting * more fixes
1 parent a14c597 commit d137e80

File tree

1 file changed

+6
-19
lines changed

1 file changed

+6
-19
lines changed

xml/System/String.xml

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -784,20 +784,6 @@ Examples of instantiating strings:
784784
[!code-cpp[stringexample1#2](~/samples/snippets/cpp/VS_Snippets_CLR/stringexample1/CPP/source.cpp#2)]
785785
[!code-csharp[stringexample1#2](~/samples/snippets/csharp/VS_Snippets_CLR/stringexample1/CS/source.cs#2)]
786786

787-
<a name="Versions"></a>
788-
## Version information
789-
.NET Framework
790-
All overloads are supported in: 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0
791-
792-
.NET Framework Client Profile
793-
All overloads are supported in: 4, 3.5 SP1
794-
795-
Portable Class Library
796-
All overloads without an <xref:System.SByte>`*` parameter are supported
797-
798-
.NET for Windows Store apps
799-
All overloads without an <xref:System.SByte>`*` parameter are supported in: Windows 8
800-
801787
]]></format>
802788
</remarks>
803789
</Docs>
@@ -7839,13 +7825,14 @@ The `comparisonType` parameter is a <xref:System.StringComparison> enumeration m
78397825

78407826
Compare this method to the <xref:System.String.IsInterned%2A> method.
78417827

7842-
## Version Considerations
7828+
## Version considerations
7829+
78437830
In the [!INCLUDE[net_v35SP1_long](~/includes/net-v35sp1-long-md.md)], the <xref:System.String.Intern%2A> method reverts to its behavior in the .NET Framework 1.0 and 1.1 with regard to interning the empty string. In the following example, the variable `str1` is assigned a reference to <xref:System.String.Empty?displayProperty=nameWithtype>, and the variable `str2` is assigned the reference to <xref:System.String.Empty?displayProperty=nameWithtype> that is returned by calling the <xref:System.String.Intern%2A> method after converting a <xref:System.Text.StringBuilder> object whose value is <xref:System.String.Empty?displayProperty=nameWithtype> to a string. Then the references contained in `str1` and `str2` are compared for equality.
78447831

78457832
[!code-csharp[System.String.Intern#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.String.Intern/cs/Intern2.cs#2)]
78467833
[!code-vb[System.String.Intern#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.String.Intern/vb/Intern2.vb#2)]
78477834

7848-
In the [!INCLUDE[net_v10_short](~/includes/net-v10-short-md.md)], [!INCLUDE[net_v11_short](~/includes/net-v11-short-md.md)], and [!INCLUDE[net_v35SP1_short](~/includes/net-v35sp1-short-md.md)], `str1` and `str2` are equal. In the [!INCLUDE[net_v20sp1_long](~/includes/net-v20sp1-long-md.md)] and [!INCLUDE[net_v30_long](~/includes/net-v30-long-md.md)], `str1` and `str2` are not equal.
7835+
In the [!INCLUDE[net_v20sp1_long](~/includes/net-v20sp1-long-md.md)] and [!INCLUDE[net_v30_long](~/includes/net-v30-long-md.md)], `str1` and `str2` are not equal. In all other versions, `str1` and `str2` are equal.
78497836

78507837
## Performance Considerations
78517838
If you are trying to reduce the total amount of memory your application allocates, keep in mind that interning a string has two unwanted side effects. First, the memory allocated for interned <xref:System.String> objects is not likely to be released until the common language runtime (CLR) terminates. The reason is that the CLR's reference to the interned <xref:System.String> object can persist after your application, or even your application domain, terminates. Second, to intern a string, you must first create the string. The memory used by the <xref:System.String> object must still be allocated, even though the memory will eventually be garbage collected.
@@ -12632,11 +12619,11 @@ The following example defines a `StripStartTags` method that uses the <xref:Syst
1263212619
<summary>Compares this instance with a specified <see cref="T:System.Object" /> and indicates whether this instance precedes, follows, or appears in the same position in the sort order as the specified <see cref="T:System.Object" />.</summary>
1263312620
<returns>A 32-bit signed integer that indicates whether this instance precedes, follows, or appears in the same position in the sort order as the <paramref name="value" /> parameter.
1263412621

12635-
<list type="table"><listheader><term>Value</term><description>Condition</description></listheader><item><term>Less than zero</term><description>This instance precedes <paramref name="value" />.</description></item><item><term>Zero</term><description>This instance has the same position in the sort order as <paramref name="value" />.</description></item><item><term>Greater than zero</term><description>This instance follows <paramref name="value" />.
12622+
<list type="table"><listheader><term>Value</term><description>Condition</description></listheader><item><term>Less than zero</term><description>This instance precedes <paramref name="value" />.</description></item><item><term>Zero</term><description>This instance has the same position in the sort order as <paramref name="value" />.</description></item><item><term>Greater than zero</term><description>This instance follows <paramref name="value" />.
1263612623

12637-
-or-
12624+
-or-
1263812625

12639-
<paramref name="value" /> is <see langword="null" />.</description></item></list></returns>
12626+
<paramref name="value" /> is <see langword="null" />.</description></item></list></returns>
1264012627
<remarks>
1264112628
<format type="text/markdown"><![CDATA[
1264212629

0 commit comments

Comments
 (0)