From 056e24f76cf4686c80c784756f6a882150654ce8 Mon Sep 17 00:00:00 2001 From: Maira Wenzel Date: Tue, 31 Mar 2020 19:14:33 -0700 Subject: [PATCH 1/2] fix return value formatting --- xml/System/String.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xml/System/String.xml b/xml/System/String.xml index 109cbfbcc19..844d6c0ab56 100644 --- a/xml/System/String.xml +++ b/xml/System/String.xml @@ -12632,11 +12632,11 @@ The following example defines a `StripStartTags` method that uses the Compares this instance with a specified and indicates whether this instance precedes, follows, or appears in the same position in the sort order as the specified . A 32-bit signed integer that indicates whether this instance precedes, follows, or appears in the same position in the sort order as the parameter. - ValueConditionLess than zeroThis instance precedes .ZeroThis instance has the same position in the sort order as .Greater than zeroThis instance follows . +ValueConditionLess than zeroThis instance precedes .ZeroThis instance has the same position in the sort order as .Greater than zeroThis instance follows . - -or- +-or- - is . + is . Date: Tue, 31 Mar 2020 19:18:54 -0700 Subject: [PATCH 2/2] more fixes --- xml/System/String.xml | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/xml/System/String.xml b/xml/System/String.xml index 844d6c0ab56..9180a114408 100644 --- a/xml/System/String.xml +++ b/xml/System/String.xml @@ -784,20 +784,6 @@ Examples of instantiating strings: [!code-cpp[stringexample1#2](~/samples/snippets/cpp/VS_Snippets_CLR/stringexample1/CPP/source.cpp#2)] [!code-csharp[stringexample1#2](~/samples/snippets/csharp/VS_Snippets_CLR/stringexample1/CS/source.cs#2)] - -## Version information - .NET Framework - All overloads are supported in: 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0 - - .NET Framework Client Profile - All overloads are supported in: 4, 3.5 SP1 - - Portable Class Library - All overloads without an `*` parameter are supported - - .NET for Windows Store apps - All overloads without an `*` parameter are supported in: Windows 8 - ]]> @@ -7839,13 +7825,14 @@ The `comparisonType` parameter is a enumeration m Compare this method to the method. -## Version Considerations +## Version considerations + In the [!INCLUDE[net_v35SP1_long](~/includes/net-v35sp1-long-md.md)], the 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 , and the variable `str2` is assigned the reference to that is returned by calling the method after converting a object whose value is to a string. Then the references contained in `str1` and `str2` are compared for equality. [!code-csharp[System.String.Intern#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.String.Intern/cs/Intern2.cs#2)] [!code-vb[System.String.Intern#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.String.Intern/vb/Intern2.vb#2)] - 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. + 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. ## Performance Considerations 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 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 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 object must still be allocated, even though the memory will eventually be garbage collected.