From a78404727d7718b55024619a82b4fad85c79767f Mon Sep 17 00:00:00 2001
From: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Date: Thu, 28 May 2026 08:19:56 -0700
Subject: [PATCH 1/6] remove .net fw remarks
---
xml/System.Text.Json/JsonElement.xml | 14 +--
xml/System.Text.RegularExpressions/Regex.xml | 7 +-
xml/System.Text/CodePagesEncodingProvider.xml | 74 ++++-------
xml/System.Text/DecoderExceptionFallback.xml | 6 +-
xml/System.Text/DecoderFallback.xml | 18 +--
xml/System.Text/DecoderFallbackBuffer.xml | 10 +-
.../DecoderReplacementFallback.xml | 5 +-
xml/System.Text/EncoderExceptionFallback.xml | 6 +-
xml/System.Text/EncoderFallback.xml | 18 +--
xml/System.Text/EncoderFallbackBuffer.xml | 10 +-
.../EncoderReplacementFallback.xml | 5 +-
xml/System.Text/Encoding.xml | 71 ++++-------
xml/System.Text/EncodingInfo.xml | 4 +-
xml/System.Text/EncodingProvider.xml | 27 ++--
xml/System.Text/StringBuilder.xml | 119 +++++++-----------
xml/System.Text/UTF7Encoding.xml | 6 +-
xml/System.Text/UTF8Encoding.xml | 14 +--
xml/System.Text/UnicodeEncoding.xml | 13 +-
18 files changed, 153 insertions(+), 274 deletions(-)
diff --git a/xml/System.Text.Json/JsonElement.xml b/xml/System.Text.Json/JsonElement.xml
index 9fa03ef7fdf..662c3f514e7 100644
--- a/xml/System.Text.Json/JsonElement.xml
+++ b/xml/System.Text.Json/JsonElement.xml
@@ -267,9 +267,9 @@ For more information, see [How to write custom serializers and deserializers wit
The value of the element as a .
This value's is neither nor .
@@ -518,8 +518,8 @@ This method does not parse the contents of a JSON string value.
## Remarks
This method does not parse the contents of a JSON string value.
-
-On .NET Core, this method returns for values larger than , and it returns for values smaller than .
+
+This method returns for values larger than , and it returns for values smaller than .
]]>
@@ -954,7 +954,7 @@ If a property is defined multiple times for the same object, the method matches
This method does not parse the contents of a JSON string value.
-On .NET Core, this method returns for values larger than and for values smaller than .
+This method returns for values larger than and for values smaller than .
]]>
@@ -1658,7 +1658,7 @@ This method does not parse the contents of a JSON string value.
This method does not parse the contents of a JSON string value.
-On .NET Core, this method does not return `false` for values larger than or smaller than . Instead, it returns `true` and assigns or to `value`.
+This method does not return `false` for values larger than or smaller than . Instead, it returns `true` and assigns or to `value`.
]]>
@@ -2081,7 +2081,7 @@ This method does not parse the contents of a JSON string value.
This method does not parse the contents of a JSON string value.
-On .NET Core, this method does not return `false` for values larger than or smaller than ). Instead, it returns `true` and assigns or to the `value` argument.
+This method does not return `false` for values larger than or smaller than ). Instead, it returns `true` and assigns or to the `value` argument.
]]>
diff --git a/xml/System.Text.RegularExpressions/Regex.xml b/xml/System.Text.RegularExpressions/Regex.xml
index ab83ce5ae96..8c399bfcba4 100644
--- a/xml/System.Text.RegularExpressions/Regex.xml
+++ b/xml/System.Text.RegularExpressions/Regex.xml
@@ -952,18 +952,15 @@
method generates a .NET Framework assembly in which each regular expression defined in the `regexinfos` array is represented by a class. Typically, the method is called from a separate application that generates an assembly of compiled regular expressions. Each regular expression included in the assembly has the following characteristics:
-- It is derived from the class.
+The method generates a .NET assembly in which each regular expression defined in the `regexinfos` array is represented by a class. Typically, the method is called from a separate application that generates an assembly of compiled regular expressions. Each regular expression included in the assembly has the following characteristics:
+- It is derived from the class.
- It is assigned the fully qualified name that is defined by the `fullnamespace` and `name` parameters of its corresponding object.
-
- It has a default (or parameterless) constructor.
Ordinarily, the code that instantiates and uses the compiled regular expression is found in an assembly or application that is separate from the code that creates the assembly.
-
-
## Examples
The following example creates an assembly named RegexLib.dll. The assembly includes two compiled regular expressions. The first, `Utilities.RegularExpressions.DuplicatedString`, matches two identical contiguous words. The second, `Utilities.RegularExpressions.EmailAddress`, checks whether a string has the correct format to be an email address.
diff --git a/xml/System.Text/CodePagesEncodingProvider.xml b/xml/System.Text/CodePagesEncodingProvider.xml
index 99b45e845d2..0e3bf683396 100644
--- a/xml/System.Text/CodePagesEncodingProvider.xml
+++ b/xml/System.Text/CodePagesEncodingProvider.xml
@@ -44,48 +44,38 @@
- Provides access to an encoding provider for code pages that otherwise are available only in the desktop .NET Framework.
+ Provides access to an encoding provider for code pages that otherwise are available only in .NET Framework.
property.
-
- ISO-8859-1 (code page 28591).
-
- UTF-7 (code page 65000), which is returned by the property.
-
- UTF-8 (code page 65001), which is returned by the property.
-
- UTF-16 and UTF-16LE (code page 1200), which is returned by the property.
-
- UTF-16BE (code page 1201), which is instantiated by calling the or constructor with a `bigEndian` value of `true`.
-
- UTF-32 and UTF-32LE (code page 12000), which is returned by the property.
-
- UTF-32BE (code page 12001), which is instantiated by calling an constructor that has a `bigEndian` parameter and providing a value of `true` in the method call.
- Other than code page 20127, code page encodings are not supported.
+Other than code page 20127, code-page encodings are not supported. The class extends to make these code pages available. To use these additional code pages, follow these steps:
- The class extends to make these code pages available to .NET Core. To use these additional code pages, you do the following:
+1. Retrieve a object from the static property.
+1. Pass the object to the method.
-- Retrieve a object from the static property.
-
-- Pass the object to the method.
-
- After an object is registered, the encodings that it supports are available by calling the overloads of ; you should not call the overloads.
+After an object is registered, the encodings that it supports are available by calling the overloads of ; you should not call the overloads.
### Impact on default encoding behavior
-Registering also affects the behavior of when called with a `codepage` argument of `0` in .NET (Core):
+Registering also affects the behavior of when called with a `codepage` argument of `0`:
-- On Windows, `GetEncoding(0)` returns the encoding that matches the system's active code page, which is the same behavior as in .NET Framework.
+- On Windows, `GetEncoding(0)` returns the encoding that matches the system's active code page.
- On non-Windows platforms, `GetEncoding(0)` returns UTF-8, maintaining cross-platform consistency.
-When no encoding provider is registered, `GetEncoding(0)` returns UTF-8 on all platforms in .NET Core and later versions.
+When no encoding provider is registered, `GetEncoding(0)` returns UTF-8 on all platforms.
]]>
@@ -104,33 +94,22 @@ When no encoding provider is registered, `GetEncoding(0)` returns UTF-8 on all p
## Remarks
-The .NET Framework supports a large number of character encodings and code pages. You can get a complete list of encodings by calling the method, which is available in the .NET Framework. On the other hand, .NET Core only supports the following encodings by default:
+.NET supports only the following encodings by default:
- ASCII (code page 20127), which is returned by the property.
-
- ISO-8859-1 (code page 28591).
-
- UTF-7 (code page 65000), which is returned by the property.
-
- UTF-8 (code page 65001), which is returned by the property.
-
- UTF-16 and UTF-16LE (code page 1200), which is returned by the property.
-
- UTF-16BE (code page 1201), which is instantiated by calling the or constructor with a `bigEndian` value of `true`.
-
- UTF-32 and UTF-32LE (code page 12000), which is returned by the property.
-
- UTF-32BE (code page 12001), which is instantiated by calling an constructor that has a `bigEndian` parameter and providing a value of `true` in the method call.
- To retrieve an encoding that is present in .NET Framework but not in .NET Core, you do the following:
-
-- Add a reference to the *System.Text.Encoding.CodePages.dll* assembly to your project.
-
-- Get the object from the static property.
+To retrieve an encoding that is present in .NET Framework but not in .NET, you do the following:
-- Pass the object to the method to make the encodings supplied by the object available to the common language runtime.
-
-- Call an overload to retrieve the encoding. The method will call the corresponding method to determine whether it can supply the requested encoding.
+1. Get the object from the static property.
+1. Pass the object to the method to make the encodings supplied by the object available to the common language runtime.
+1. Call an overload to retrieve the encoding. The method will call the corresponding method to determine whether it can supply the requested encoding.
]]>
@@ -172,11 +151,11 @@ The .NET Framework supports a large number of character encodings and code pages
## Remarks
-This method provides access to code page encodings that are available in .NET Framework but not natively supported in .NET Core and later versions.
+This method provides access to code page encodings that are available in .NET Framework but not natively supported in modern .NET.
When `codepage` is `0`, this method has special behavior that affects the default encoding returned by :
-- **On Windows**: Returns the encoding that matches the system's active code page, providing the same behavior as .NET Framework.
+- **On Windows**: Returns the encoding that matches the system's active code page.
- **On non-Windows platforms**: Returns `null`, allowing to fall back to its default UTF-8 behavior.
For all other supported code page identifiers, this method returns the corresponding encoding if it's available from the code pages encoding provider, or `null` if the code page is not supported.
@@ -279,38 +258,29 @@ For all other supported code page identifiers, this method returns the correspon
System.Text.EncodingProvider
- Gets an encoding provider for code pages supported in the desktop .NET Framework but not in the current .NET Framework platform.
+ Gets an encoding provider for code pages supported in .NET Framework but not in modern .NET.
An encoding provider that allows access to encodings not supported on the current .NET Framework platform.
method, which is available in the .NET Framework. On the other hand, .NET Core only supports the following encodings by default:
+.NET supports only the following encodings by default:
- ASCII (code page 20127), which is returned by the property.
-
- ISO-8859-1 (code page 28591).
-
- UTF-7 (code page 65000), which is returned by the property.
-
- UTF-8 (code page 65001), which is returned by the property.
-
- UTF-16 and UTF-16LE (code page 1200), which is returned by the property.
-
- UTF-16BE (code page 1201), which is instantiated by calling the or constructor with a `bigEndian` value of `true`.
-
- UTF-32 and UTF-32LE (code page 12000), which is returned by the property.
-
- UTF-32BE (code page 12001), which is instantiated by calling an constructor that has a `bigEndian` parameter and providing a value of `true` in the method call.
- To retrieve an encoding that is present in the .NET Framework but not in .NET Core, you do the following:
-
-- Get the object from the static property.
-
-- Pass the object to the method to make the encodings supplied by the object available to the common language runtime.
+To retrieve an encoding that is present in .NET Framework but not in modern .NET, you do the following:
-- Call an overload to retrieve the encoding. The method will call the corresponding method to determine whether it can supply the requested encoding.
+1. Get the object from the static property.
+1. Pass the object to the method to make the encodings supplied by the object available to the common language runtime.
+1. Call an overload to retrieve the encoding. The method will call the corresponding method to determine whether it can supply the requested encoding.
]]>
diff --git a/xml/System.Text/DecoderExceptionFallback.xml b/xml/System.Text/DecoderExceptionFallback.xml
index 667cbb4914a..2208405be8f 100644
--- a/xml/System.Text/DecoderExceptionFallback.xml
+++ b/xml/System.Text/DecoderExceptionFallback.xml
@@ -66,11 +66,9 @@
A decoding operation can fail if the input byte sequence cannot be mapped by the encoding. For example, an object cannot decode a byte sequence that yields a character having a code point value that is outside the range U+0000 to U+007F.
- In cases where an encoding or decoding conversion cannot be performed, the .NET Framework provides a failure-handling mechanism called a fallback. Your application can use the predefined .NET Framework decoder fallback, or it can create a custom decoder fallback derived from the and classes.
-
- The .NET Framework provides two predefined classes that implement different fallback strategies for handling decoding conversion failures. The class substitutes a string provided in place of any input byte sequence that cannot be converted. After the substitute string is emitted, the decoding operation continues converting the remainder of the input. In contrast, the class throws a when an invalid byte sequence is encountered.
-
+ In cases where an encoding or decoding conversion cannot be performed, .NET provides a failure-handling mechanism called a fallback. Your application can use the predefined decoder fallback, or it can create a custom decoder fallback derived from the and classes.
+.NET provides two predefined classes that implement different fallback strategies for handling decoding conversion failures. The class substitutes a string provided in place of any input byte sequence that cannot be converted. After the substitute string is emitted, the decoding operation continues converting the remainder of the input. In contrast, the class throws a when an invalid byte sequence is encountered.
## Examples
The following code example demonstrates the and classes.
diff --git a/xml/System.Text/DecoderFallback.xml b/xml/System.Text/DecoderFallback.xml
index 9e47bc33da4..cf97331b586 100644
--- a/xml/System.Text/DecoderFallback.xml
+++ b/xml/System.Text/DecoderFallback.xml
@@ -72,15 +72,15 @@
A decoding operation can fail if the input byte sequence cannot be mapped by the encoding. For example, an object cannot decode a byte sequence if that sequence represents a character that has a code point value that is outside the range U+0000 to U+007F.
- When a decoding conversion cannot be performed, the .NET Framework provides a failure-handling mechanism called a fallback. Your application can use predefined .NET Framework decoder fallbacks, or it can create a custom decoder fallback derived from the and classes.
+ When a decoding conversion cannot be performed, .NET provides a failure-handling mechanism called a fallback. Your application can use predefined .NET decoder fallbacks, or it can create a custom decoder fallback derived from the and classes.
- and are the base classes for all decoding fallback handlers in the .NET Framework. They support the following three kinds of fallback handling mechanisms:
+ and are the base classes for all decoding fallback handlers in .NET. They support the following three kinds of fallback handling mechanisms:
-- Best-fit fallback, which maps valid Unicode characters that cannot be decoded to an approximate equivalent. For example, a best-fit fallback handler for the class might map Æ (U+00C6) to AE (U+0041 + U+0045). A best-fit fallback handler might also be implemented to transliterate one alphabet (such as Cyrillic) to another (such as Latin or Roman). The .NET Framework does not provide any public best-fit fallback implementations.
+- Best-fit fallback, which maps valid Unicode characters that cannot be decoded to an approximate equivalent. For example, a best-fit fallback handler for the class might map Æ (U+00C6) to AE (U+0041 + U+0045). A best-fit fallback handler might also be implemented to transliterate one alphabet (such as Cyrillic) to another (such as Latin or Roman). .NET does not provide any public best-fit fallback implementations.
-- Replacement fallback, which replaces each character that cannot be decoded with a predefined string. The .NET Framework provides a predefined replacement fallback handler. The class replaces each byte sequence that cannot be decoded with a question mark character ("?", or U+003F) or a REPLACEMENT CHARACTER (U+FFFD). You can customize the replacement string by specifying a substitute in the call to the constructor. After the substitute string is emitted, the decoding operation continues converting the remainder of the input.
+- Replacement fallback, which replaces each character that cannot be decoded with a predefined string. .NET provides a predefined replacement fallback handler. The class replaces each byte sequence that cannot be decoded with a question mark character ("?", or U+003F) or a REPLACEMENT CHARACTER (U+FFFD). You can customize the replacement string by specifying a substitute in the call to the constructor. After the substitute string is emitted, the decoding operation continues converting the remainder of the input.
-- Exception fallback, which throws an exception when a byte sequence cannot be decoded. The .NET Framework provides a predefined exception fallback handler. The class throws a when an invalid byte sequence is encountered, and the decoding operation terminates.
+- Exception fallback, which throws an exception when a byte sequence cannot be decoded. .NET provides a predefined exception fallback handler. The class throws a when an invalid byte sequence is encountered, and the decoding operation terminates.
If you choose to implement a custom solution, you must override the following abstract members of the class:
@@ -88,14 +88,14 @@
- The property, which returns the maximum number of characters that the fallback implementation can return. For an exception fallback handler, its value should be zero.
- For more information about encoding, decoding, and fallback strategies, see [Character Encoding in the .NET Framework](/dotnet/standard/base-types/character-encoding).
+ For more information about encoding, decoding, and fallback strategies, see [Character Encoding in .NET](/dotnet/standard/base-types/character-encoding).
]]>
- Character Encoding in the .NET Framework
+ Character Encoding in .NET
@@ -186,14 +186,14 @@
that is responsible for performing the fallback operation. For example, of the predefined implementations in the .NET Framework, the method returns a object, and the method returns a object.
+ This method returns an object derived from that is responsible for performing the fallback operation. For example, of the predefined implementations in .NET, the method returns a object, and the method returns a object.
The method is called by a decoder when it encounters the first byte that it is unable to decode. The object returned by this method provides the fallback implementation and is responsible for returning the string that replaces the byte or bytes that could not be decoded.
]]>
- Character Encoding in the .NET Framework
+ Character Encoding in .NET
diff --git a/xml/System.Text/DecoderFallbackBuffer.xml b/xml/System.Text/DecoderFallbackBuffer.xml
index a1454049b97..2f9cea32766 100644
--- a/xml/System.Text/DecoderFallbackBuffer.xml
+++ b/xml/System.Text/DecoderFallbackBuffer.xml
@@ -64,7 +64,7 @@
## Remarks
An encoding defines a mapping between a Unicode character and an encoded sequence of bytes. A decoding operation, which converts an input byte sequence to an output character, fails if no mapping is defined for a particular byte sequence.
- The .NET Framework provides a failure handling mechanism, called a fallback, if a conversion cannot be performed. All decoder fallback handlers must implement the following:
+ .NET provides a failure handling mechanism, called a fallback, if a conversion cannot be performed. All decoder fallback handlers must implement the following:
- A decoder fallback, which is represented by a class derived from the class.
@@ -72,11 +72,11 @@
Fallbacks can use three strategies to handle conversion failures:
-- Best-fit mapping. The decoder fallback buffer can return a string that represents a close approximation to the input byte sequence. The .NET Framework does not provide a public best-fit implementation.
+- Best-fit mapping. The decoder fallback buffer can return a string that represents a close approximation to the input byte sequence. .NET does not provide a public best-fit implementation.
-- Replacement. The decoder fallback buffer can return a string, such as a question mark ("?"), that indicates that a byte sequence could not be decoded. In the .NET Framework, the and classes provide a public replacement fallback buffer implementation. The constructor of the class enables you to define the replacement string.
+- Replacement. The decoder fallback buffer can return a string, such as a question mark ("?"), that indicates that a byte sequence could not be decoded. In .NET, the and classes provide a public replacement fallback buffer implementation. The constructor of the class enables you to define the replacement string.
-- Exception. The implementation throws an exception, which indicates that a byte sequence cannot be decoded, and terminates the decoding operation. In this case, the fallback handler must provide a implementation, although it does not return a string to the decoder. In the .NET Framework, the and classes provide a public exception fallback implementation that throws a when a byte sequence cannot be decoded.
+- Exception. The implementation throws an exception, which indicates that a byte sequence cannot be decoded, and terminates the decoding operation. In this case, the fallback handler must provide a implementation, although it does not return a string to the decoder. In .NET, the and classes provide a public exception fallback implementation that throws a when a byte sequence cannot be decoded.
The buffer in a implementation represents the entire string to be returned to the decoder in response to a decoder fallback. Generally, implementations also include state information, such as the index of the next character to return to the decoder and the number of remaining characters to be returned. Because is an abstract class, it requires derived classes to implement the following members at a minimum:
@@ -91,7 +91,7 @@
]]>
- Character Encoding in the .NET Framework
+ Character Encoding in .NET
diff --git a/xml/System.Text/DecoderReplacementFallback.xml b/xml/System.Text/DecoderReplacementFallback.xml
index ab4bbc1992c..bbf8be515dc 100644
--- a/xml/System.Text/DecoderReplacementFallback.xml
+++ b/xml/System.Text/DecoderReplacementFallback.xml
@@ -73,12 +73,9 @@
The replacement string used by a object is determined by the call to its class constructor. Two options are available:
- Replacement with the default character. If you call the constructor, the replacement character is "?" (U+003F).
-
- Replacement with a string of your choice. If you call the constructor, you provide the replacement string.
- This class is one of two .NET Framework classes that implement different fallback strategies for handling decoding conversion failures. The other class is the class, which throws a when an invalid byte sequence is encountered.
-
-
+ This class is one of two .NET classes that implement different fallback strategies for handling decoding conversion failures. The other class is the class, which throws a when an invalid byte sequence is encountered.
## Examples
The following code example demonstrates the class.
diff --git a/xml/System.Text/EncoderExceptionFallback.xml b/xml/System.Text/EncoderExceptionFallback.xml
index 56606da207c..28915dddd54 100644
--- a/xml/System.Text/EncoderExceptionFallback.xml
+++ b/xml/System.Text/EncoderExceptionFallback.xml
@@ -66,11 +66,9 @@
An encoding operation can fail if the input character cannot be represented by the encoding. For example, a object cannot encode a character that yields a Unicode code point value that is outside the range U+0000 to U+007F.
- In cases where an encoding or decoding conversion cannot be performed, the .NET Framework provides a failure-handling mechanism called a fallback. Your application can use the predefined .NET Framework encoder fallback, or it can create a custom encoder fallback derived from the and classes.
-
- The .NET Framework provides two predefined classes that implement different fallback strategies for handling encoding conversion failures. The class substitutes a string provided for any input character that cannot be converted. The substitute string is encoded in place of the invalid character, and then the encoding operation continues converting the remainder of the input. In contrast, the class throws a when an invalid character is encountered.
-
+ In cases where an encoding or decoding conversion cannot be performed, .NET provides a failure-handling mechanism called a fallback. Your application can use the predefined .NET encoder fallback, or it can create a custom encoder fallback derived from the and classes.
+ .NET provides two predefined classes that implement different fallback strategies for handling encoding conversion failures. The class substitutes a string provided for any input character that cannot be converted. The substitute string is encoded in place of the invalid character, and then the encoding operation continues converting the remainder of the input. In contrast, the class throws a when an invalid character is encountered.
## Examples
The following code example demonstrates the and classes.
diff --git a/xml/System.Text/EncoderFallback.xml b/xml/System.Text/EncoderFallback.xml
index 34577e2193d..8a801744755 100644
--- a/xml/System.Text/EncoderFallback.xml
+++ b/xml/System.Text/EncoderFallback.xml
@@ -72,15 +72,15 @@
An encoding operation can fail if the input character cannot be represented by the encoding. For example, an object cannot encode a character whose Unicode code point value is outside the range U+0000 to U+007F.
- When an encoding conversion cannot be performed, the .NET Framework provides a failure-handling mechanism called a fallback. Your application can use predefined .NET Framework encoder fallbacks, or it can create a custom encoder fallback derived from the and classes.
+ When an encoding conversion cannot be performed, .NET provides a failure-handling mechanism called a fallback. Your application can use predefined .NET encoder fallbacks, or it can create a custom encoder fallback derived from the and classes.
- and are the base classes for all encoding fallback handlers in the .NET Framework. They support the following three kinds of fallback handling mechanisms:
+ and are the base classes for all encoding fallback handlers in .NET. They support the following three kinds of fallback handling mechanisms:
-- Best-fit fallback, which maps valid Unicode characters that cannot be encoded to an approximate equivalent. For example, a best-fit fallback handler for the class might map Æ (U+00C6) to AE (U+0041 + U+0045). A best-fit fallback handler might also be implemented to transliterate one alphabet (such as Cyrillic) to another (such as Latin or Roman). The .NET Framework does not provide any public best-fit fallback implementations.
+- Best-fit fallback, which maps valid Unicode characters that cannot be encoded to an approximate equivalent. For example, a best-fit fallback handler for the class might map Æ (U+00C6) to AE (U+0041 + U+0045). A best-fit fallback handler might also be implemented to transliterate one alphabet (such as Cyrillic) to another (such as Latin or Roman). .NET does not provide any public best-fit fallback implementations.
-- Replacement fallback, which replaces each character that cannot be encoded with a predefined string. The .NET Framework provides a predefined replacement fallback handler. The class replaces each byte sequence that cannot be decoded with a question mark character ("?", or U+003F) or a REPLACEMENT CHARACTER (U+FFFD). You can customize the replacement string by specifying a substitute in the call to the constructor. After the substitute string is emitted, the encoding operation continues converting the remainder of the input.
+- Replacement fallback, which replaces each character that cannot be encoded with a predefined string. .NET provides a predefined replacement fallback handler. The class replaces each byte sequence that cannot be decoded with a question mark character ("?", or U+003F) or a REPLACEMENT CHARACTER (U+FFFD). You can customize the replacement string by specifying a substitute in the call to the constructor. After the substitute string is emitted, the encoding operation continues converting the remainder of the input.
-- Exception fallback, which throws an exception when a character cannot be encoded. The .NET Framework provides a predefined exception fallback handler. The class throws an when an invalid character is encountered, and the encoding operation terminates.
+- Exception fallback, which throws an exception when a character cannot be encoded. .NET provides a predefined exception fallback handler. The class throws an when an invalid character is encountered, and the encoding operation terminates.
If you choose to implement a custom solution, you must override the following abstract members of the class:
@@ -88,14 +88,14 @@
- The property, which returns the maximum number of characters that the fallback implementation can return. For an exception fallback handler, its value should be zero.
- For more information about encoding, decoding, and fallback strategies, see [Character Encoding in the .NET Framework](/dotnet/standard/base-types/character-encoding).
+ For more information about encoding, decoding, and fallback strategies, see [Character Encoding in .NET](/dotnet/standard/base-types/character-encoding).
]]>
- Character Encoding in the .NET Framework
+ Character Encoding in .NET
@@ -186,14 +186,14 @@
that is responsible for performing the fallback operation. For example, of the predefined implementations in the .NET Framework, the method returns an object, and the method returns an object.
+ This method returns an object derived from that is responsible for performing the fallback operation. For example, of the predefined implementations in .NET, the method returns an object, and the method returns an object.
The method is called by an encoder when it encounters the first character that it is unable to encode. The object returned by this method provides the fallback implementation and is responsible for returning the byte array that replaces the character or characters that could not be encoded.
]]>
- Character Encoding in the .NET Framework
+ Character Encoding in .NET
diff --git a/xml/System.Text/EncoderFallbackBuffer.xml b/xml/System.Text/EncoderFallbackBuffer.xml
index 9457077c2ea..79e99ed115b 100644
--- a/xml/System.Text/EncoderFallbackBuffer.xml
+++ b/xml/System.Text/EncoderFallbackBuffer.xml
@@ -64,7 +64,7 @@
## Remarks
An encoding defines a mapping between a Unicode character and an encoded sequence of bytes. An encoding operation, which converts an input character to an output byte sequence, fails if no mapping is defined for a particular character.
- The .NET Framework provides a failure handling mechanism, called a fallback, if a conversion cannot be performed. All encoder fallback handlers must implement the following:
+ .NET provides a failure handling mechanism, called a fallback, if a conversion cannot be performed. All encoder fallback handlers must implement the following:
- An encoder fallback, which is represented by a class derived from the class.
@@ -72,11 +72,11 @@
Fallbacks can use three strategies to handle conversion failures:
-- Best-fit mapping. The encoder fallback buffer can return a string that represents a close approximation to the input character. The .NET Framework does not provide a public best-fit implementation.
+- Best-fit mapping. The encoder fallback buffer can return a string that represents a close approximation to the input character. .NET does not provide a public best-fit implementation.
-- Replacement. The encoder fallback buffer can return a string, such as a question mark ("?"), that indicates that a character could not be encoded. In the .NET Framework, the and classes provide a public replacement fallback buffer implementation. The constructor of the class enables you to define the replacement string.
+- Replacement. The encoder fallback buffer can return a string, such as a question mark ("?"), that indicates that a character could not be encoded. In .NET, the and classes provide a public replacement fallback buffer implementation. The constructor of the class enables you to define the replacement string.
-- Exception. The implementation throws an exception, which indicates that a character cannot be encoded, and terminates the encoding operation. In this case, the fallback handler must provide an implementation, although it does not return a string to the encoder. In the .NET Framework, the and classes provide a public exception fallback implementation that throws an when a character cannot be encoded.
+- Exception. The implementation throws an exception, which indicates that a character cannot be encoded, and terminates the encoding operation. In this case, the fallback handler must provide an implementation, although it does not return a string to the encoder. In .NET, the and classes provide a public exception fallback implementation that throws an when a character cannot be encoded.
The buffer in an implementation represents the entire string to be returned to the encoder in response to an encoder fallback. Generally, implementations also include state information, such as the index of the next character to return to the encoder and the number of remaining characters to be returned. Because is an abstract class, it requires derived classes to implement the following members at a minimum:
@@ -91,7 +91,7 @@
]]>
- Character Encoding in the .NET Framework
+ Character Encoding in .NET
diff --git a/xml/System.Text/EncoderReplacementFallback.xml b/xml/System.Text/EncoderReplacementFallback.xml
index d9c9e204bab..60d4155f8c8 100644
--- a/xml/System.Text/EncoderReplacementFallback.xml
+++ b/xml/System.Text/EncoderReplacementFallback.xml
@@ -73,14 +73,11 @@
The replacement string used by an object is determined by the call to its class constructor. Two options are available:
- Replacement with the default character. If you call the constructor, the replacement character is "?" (U+003F).
-
- Replacement with a string of your choice. If you call the constructor, you provide the replacement string.
If you choose a fallback string to use with this class, make sure that the string is composed entirely of characters that can be encoded in the target encoding. Otherwise, a recursive fallback results, causing an .
- This class is one of two .NET Framework classes that implement different fallback strategies for handling encoding conversion failures. The other class is the class, which throws an when an invalid character is encountered.
-
-
+ This class is one of two .NET classes that implement different fallback strategies for handling encoding conversion failures. The other class is the class, which throws an when an invalid character is encountered.
## Examples
The following example demonstrates the class.
diff --git a/xml/System.Text/Encoding.xml b/xml/System.Text/Encoding.xml
index db2be0f4c75..9c342d046fe 100644
--- a/xml/System.Text/Encoding.xml
+++ b/xml/System.Text/Encoding.xml
@@ -329,10 +329,8 @@ The following example converts a string from one encoding to another.
When selecting the ASCII encoding for your app, consider the following:
- The ASCII encoding is usually appropriate for protocols that require ASCII.
-
- If you require 8-bit encoding (which is sometimes incorrectly referred to as "ASCII"), the UTF-8 encoding is recommended over the ASCII encoding. For the characters 0-7F, the results are identical, but use of UTF-8 avoids data loss by allowing representation of all Unicode characters that are representable. Note that the ASCII encoding has an 8th bit ambiguity that can allow malicious use, but the UTF-8 encoding removes ambiguity about the 8th bit.
-
-- Prior to .NET Framework version 2.0, .NET Framework allowed spoofing by ignoring the 8th bit. Beginning with .NET Framework 2.0, non-ASCII code points fall back during decoding.
+- Non-ASCII code points fall back during decoding.
The object that is returned by this property might not have the appropriate behavior for your app. It uses replacement fallback to replace each string that it cannot encode and each byte that it cannot decode with a question mark ("?") character. Instead, you can call the method to instantiate an object whose fallback is either an or a , as the following example illustrates.
@@ -954,11 +952,7 @@ The returned 's and property varies between different .NET implementations:
-
-- **In .NET Framework**: Returns the encoding that corresponds to the system's active code page. This is the same encoding returned by when called with a `codepage` argument of `0`.
-
-- **In .NET Core and later versions**: Always returns a object. This behavior was changed to encourage the use of Unicode encodings for better cross-platform compatibility and data integrity.
+The property always returns a object. This behavior encourages the use of Unicode encodings for better cross-platform compatibility and data integrity.
For the most consistent results across different platforms and .NET implementations, consider using a specific Unicode encoding such as UTF-8 directly instead of relying on the default encoding. You can obtain UTF-8 encoding by calling or with "utf-8".
@@ -3500,27 +3494,21 @@ For more information about this API, see The list of supported encodings that returns includes any additional encodings made available by any implementations that were registered by calling .
To get a specific encoding, use the method.
@@ -5260,17 +5234,16 @@ The goal is to save this file, then open and decode it as a binary stream.
## Remarks
The method allows you to register a class derived from that makes character encodings available on a platform that does not otherwise support them. Once the encoding provider is registered, the encodings that it supports can be retrieved by calling any overload. If there are multiple encoding providers, the method attempts to retrieve a specified encoding from each provider starting with the one most recently registered.
-Registering an encoding provider by using the method also affects the behavior of when passed an argument of `0`. This is particularly important in .NET Core and later versions where the default behavior for with `codepage` 0 is to return UTF-8:
+Registering an encoding provider by using the method also affects the behavior of when passed an argument of `0`. The default behavior for with `codepage` 0 is to return UTF-8:
- **If the registered provider is **:
- - On **Windows**, with `codepage` 0 returns the encoding that matches the system's active code page (same as .NET Framework behavior).
+ - On **Windows**, with `codepage` 0 returns the encoding that matches the system's active code page.
- On **non-Windows platforms**, it still returns UTF-8.
-
- **If a custom encoding provider is registered**: The provider can choose which encoding to return when is passed an argument of `0`. The provider can also choose to not handle this case by returning `null` from its method, in which case the default UTF-8 behavior is used.
If multiple providers are registered, attempts to retrieve the encoding from the most recently registered provider first.
-Starting with .NET Framework 4.6, .NET Framework includes one encoding provider, , that makes the encodings available that are present in the full .NET Framework but are not available in the Universal Windows Platform. By default, the Universal Windows Platform only supports the Unicode encodings, ASCII, and code page 28591.
+.NET includes one encoding provider, , that makes additional encodings available.
If the same encoding provider is used in multiple calls to the method, only the first method call registers the provider. Subsequent calls are ignored.
diff --git a/xml/System.Text/EncodingInfo.xml b/xml/System.Text/EncodingInfo.xml
index a2f65803acf..bc2ea37c85e 100644
--- a/xml/System.Text/EncodingInfo.xml
+++ b/xml/System.Text/EncodingInfo.xml
@@ -58,10 +58,8 @@
This class is intended to provide minimal information about an encoding. To obtain additional information, the application should use the method to get an instance of the class, which contains more comprehensive information about the encoding it represents.
-
-
## Examples
- The following example uses the method to retrieve an object for each encoding supported by the .NET Framework. It then displays the value of each encoding's , , and property and compares them with the corresponding names.
+ The following example uses the method to retrieve an object for each encoding supported by .NET. It then displays the value of each encoding's , , and property and compares them with the corresponding names.
:::code language="csharp" source="~/snippets/csharp/System.Text/EncodingInfo/Overview/encodinginfo.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/System.Text/EncodingInfo/Overview/encodinginfo.vb" id="Snippet1":::
diff --git a/xml/System.Text/EncodingProvider.xml b/xml/System.Text/EncodingProvider.xml
index b5168e3f84b..6d330135c17 100644
--- a/xml/System.Text/EncodingProvider.xml
+++ b/xml/System.Text/EncodingProvider.xml
@@ -69,35 +69,28 @@
## Remarks
An encoding provider supplies encodings that are not otherwise available on a particular target platform.
- The .NET Framework supports a large number of character encodings and code pages. You can get a complete list of encodings available in the .NET Framework by calling the method. .NET Core, on the other hand, by default supports only the following encodings:
+Modern .NET supports only the following encodings:
- ASCII (code page 20127), which is returned by the property.
-
- ISO-8859-1 (code page 28591).
-
- UTF-7 (code page 65000), which is returned by the property.
-
- UTF-8 (code page 65001), which is returned by the property.
-
- UTF-16 and UTF-16LE (code page 1200), which is returned by the property.
-
- UTF-16BE (code page 1201), which is instantiated by calling the or constructor with a `bigEndian` value of `true`.
-
- UTF-32 and UTF-32LE (code page 12000), which is returned by the property.
-
- UTF-32BE (code page 12001), which is instantiated by calling an constructor that has a `bigEndian` parameter and providing a value of `true` in the method call.
- Starting with the .NET Framework 4.6, is the base class that makes otherwise unavailable encodings available to the .NET Framework. This involves the following steps:
+ is the base class that makes otherwise unavailable encodings available. This involves the following steps:
-1. Define a subclass of that overrides the two abstract overloads, and . These overloads return the otherwise unsupported encoding by code page identifier and by name. Note that you can also choose to return a default encoding if the method is called with an argument of 0.
+1. Define a subclass of that overrides the two abstract overloads, and . These overloads return the otherwise unsupported encoding by code page identifier and by name. Note that you can also choose to return a default encoding if the method is called with an argument of 0.
-2. Optionally, you can override the virtual and methods. In most cases, this is not necessary, since the base class provides a default implementation.
+2. Optionally, you can override the virtual and methods. In most cases, this is not necessary, since the base class provides a default implementation.
-3. Pass the instance to the method to make the encodings supplied by the object available to the common language runtime.
+3. Pass the instance to the method to make the encodings supplied by the object available to the common language runtime.
-4. Call an overload to retrieve the encoding. The method will call the corresponding to determine whether it can supply the requested encoding.
+4. Call an overload to retrieve the encoding. The method will call the corresponding to determine whether it can supply the requested encoding.
- The .NET Framework Class Library provides one static property, , that returns an object that makes the full set of encodings available on the desktop .NET Framework Class Library available to .NET Core applications. In addition, you can derive from the class to make your own encodings available.
+.NET provides one static property, , that returns an object that makes the full set of encodings available. In addition, you can derive from the class to make your own encodings available.
]]>
@@ -349,7 +342,7 @@ This method is called by the [Encoding.GetEncoding(String)](, or the `decoderExceptionFallback` argument is an instance of , the encoding method throws an exception if characters cannot be encoded, and the decoding method throws an exception if a byte sequence cannot be decoded.
@@ -477,11 +470,11 @@ This method is called by the [Encoding.GetEncoding(String)](An array that contains all the supported encodings.
, uniquely distinguished by code page.
> [!NOTE]
-> Starting in .NET 5, the list of supported encodings returned by includes encodings made available by any implementations that were registered by calls to the method.
+> The list of supported encodings returned by includes encodings made available by any implementations that were registered by calls to the method.
]]>
diff --git a/xml/System.Text/StringBuilder.xml b/xml/System.Text/StringBuilder.xml
index 7b3d7e7d275..883726682da 100644
--- a/xml/System.Text/StringBuilder.xml
+++ b/xml/System.Text/StringBuilder.xml
@@ -75,7 +75,7 @@ The following example shows how to call many of the methods defined by the
- In .NET Core and in .NET Framework 4.0 and later versions, when you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
+ When you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
@@ -337,7 +337,7 @@ The following example shows how to call many of the methods defined by the
is less than one, is less than zero, or is greater than .
- In .NET Core and in the .NET Framework 4.0 and later versions, when you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
+ When you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
@@ -558,7 +558,7 @@ The following example shows how to call many of the methods defined by the
Enlarging the value of this instance would exceed .
- In .NET Core and in the .NET Framework 4.0 and later versions, when you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
+ When you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
@@ -625,7 +625,7 @@ The following example shows how to call many of the methods defined by the
Enlarging the value of this instance would exceed .
- In .NET Core and in the .NET Framework 4.0 and later versions, when you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
+ When you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
@@ -690,7 +690,7 @@ The following example shows how to call many of the methods defined by the
Enlarging the value of this instance would exceed .
- In .NET Core and in the .NET Framework 4.0 and later versions, when you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
+ When you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
@@ -765,7 +765,7 @@ The following example shows how to call many of the methods defined by the
Enlarging the value of this instance would exceed .
- In .NET Core and in the .NET Framework 4.0 and later versions, when you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
+ When you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
@@ -831,7 +831,7 @@ The following example shows how to call many of the methods defined by the
Enlarging the value of this instance would exceed .
- In .NET Core and in the .NET Framework 4.0 and later versions, when you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
+ When you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
@@ -898,7 +898,7 @@ The following example shows how to call many of the methods defined by the
Enlarging the value of this instance would exceed .
- In .NET Core and in the .NET Framework 4.0 and later versions, when you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
+ When you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
@@ -965,7 +965,7 @@ The following example shows how to call many of the methods defined by the
Enlarging the value of this instance would exceed .
- In .NET Core and in the .NET Framework 4.0 and later versions, when you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
+ When you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
@@ -1032,7 +1032,7 @@ The following example shows how to call many of the methods defined by the
Enlarging the value of this instance would exceed .
- In .NET Core and in the .NET Framework 4.0 and later versions, when you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
+ When you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
@@ -1099,7 +1099,7 @@ The following example shows how to call many of the methods defined by the
Enlarging the value of this instance would exceed .
- In .NET Core and in the .NET Framework 4.0 and later versions, when you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
+ When you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
@@ -1174,7 +1174,7 @@ The following example shows how to call many of the methods defined by the
Enlarging the value of this instance would exceed .
- In .NET Core and in the .NET Framework 4.0 and later versions, when you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
+ When you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
@@ -1332,7 +1332,7 @@ The following example shows how to call many of the methods defined by the
Enlarging the value of this instance would exceed .
- In .NET Core and in the .NET Framework 4.0 and later versions, when you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
+ When you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
@@ -1399,7 +1399,7 @@ The following example shows how to call many of the methods defined by the
Enlarging the value of this instance would exceed .
- In .NET Core and in the .NET Framework 4.0 and later versions, when you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
+ When you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
@@ -1474,7 +1474,7 @@ The following example shows how to call many of the methods defined by the
Enlarging the value of this instance would exceed .
- In .NET Core and in the .NET Framework 4.0 and later versions, when you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
+ When you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
@@ -1663,7 +1663,7 @@ The following example shows how to call many of the methods defined by the
Enlarging the value of this instance would exceed .
- In .NET Core and in the .NET Framework 4.0 and later versions, when you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
+ When you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
@@ -1736,7 +1736,7 @@ The following example shows how to call many of the methods defined by the
Enlarging the value of this instance would exceed .
- In .NET Core and in the .NET Framework 4.0 and later versions, when you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
+ When you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
@@ -1809,7 +1809,7 @@ The following example shows how to call many of the methods defined by the
Enlarging the value of this instance would exceed .
- In .NET Core and in the .NET Framework 4.0 and later versions, when you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
+ When you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
@@ -1882,7 +1882,7 @@ The following example shows how to call many of the methods defined by the .
Out of memory.
- In .NET Core and in the .NET Framework 4.0 and later versions, when you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
+ When you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
@@ -1972,7 +1972,7 @@ The following example shows how to call many of the methods defined by the
is a null pointer.
- In .NET Core and in the .NET Framework 4.0 and later versions, when you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
+ When you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
@@ -2114,7 +2114,7 @@ The following example shows how to call many of the methods defined by the .
- In .NET Core and in the .NET Framework 4.0 and later versions, when you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
+ When you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
@@ -2208,7 +2208,7 @@ The following example shows how to call many of the methods defined by the .
- In .NET Core and in the .NET Framework 4.0 and later versions, when you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
+ When you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
@@ -2346,7 +2346,7 @@ The following example shows how to call many of the methods defined by the object.
+ This method uses the [composite formatting feature](/dotnet/standard/base-types/composite-formatting) to convert the value of an object to its text representation and embed that representation in the current object.
The `format` parameter consists of zero or more runs of text intermixed with zero or more indexed placeholders, called format items. The index of the format items must be 0, to correspond to `arg0`, the single object in the parameter list of this method. The formatting process replaces each format item with the string representation of `arg0`.
@@ -2369,8 +2369,6 @@ The following example shows how to call many of the methods defined by the method.
@@ -2390,7 +2388,7 @@ The following example shows how to call many of the methods defined by the
The length of the expanded string would exceed .
- In .NET Core and in the .NET Framework 4.0 and later versions, when you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
+ When you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
Formatting Types in .NET
Composite Formatting
@@ -2472,7 +2470,7 @@ The following example shows how to call many of the methods defined by the object.
+ This method uses the [composite formatting feature](/dotnet/standard/base-types/composite-formatting) of .NET to convert the value of an object to its text representation and embed that representation in the current object.
The `format` parameter consists of zero or more runs of text intermixed with zero or more indexed placeholders, called format items, that correspond to objects in the parameter list of this method. The formatting process replaces each format item with the string representation of the corresponding object.
@@ -2516,7 +2514,7 @@ The following example shows how to call many of the methods defined by the array.
The length of the expanded string would exceed .
- In .NET Core and in the .NET Framework 4.0 and later versions, when you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
+ When you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
Formatting Types in .NET
Composite Formatting
@@ -2665,7 +2663,7 @@ The index of a format item is less than 0 (zero), or greater than or equal to th
object.
+ This method uses the [composite formatting feature](/dotnet/standard/base-types/composite-formatting) of .NET to convert the value of `arg0` to its text representation and embed that representation in the current object.
The `format` parameter consists of zero or more runs of text intermixed with zero or more indexed placeholders, called format items. The index of each format item must be zero (0) since this method includes an argument list with a single argument. The formatting process replaces each format item with the string representation of `arg0`.
@@ -2717,7 +2715,7 @@ The index of a format item is less than 0 (zero), or greater than or equal to th
The index of a format item is less than 0 (zero), or greater than or equal to one (1).
The length of the expanded string would exceed .
- In .NET Core and in the .NET Framework 4.0 and later versions, when you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
+ When you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
Formatting Types in .NET
Composite Formatting
@@ -2809,7 +2807,7 @@ The index of a format item is less than 0 (zero), or greater than or equal to th
object.
+ This method uses the [composite formatting feature](/dotnet/standard/base-types/composite-formatting) of .NET to convert the value of an object to its text representation and embed that representation in the current object.
The `format` parameter consists of zero or more runs of text intermixed with zero or more indexed placeholders, called format items, that correspond to objects in the parameter list of this method. The formatting process replaces each format item with the string representation of the corresponding object.
@@ -2869,7 +2867,7 @@ The index of a format item is less than 0 (zero), or greater than or equal to th
The index of a format item is less than 0 (zero), or greater than or equal to the length of the array.
The length of the expanded string would exceed .
- In .NET Core and in the .NET Framework 4.0 and later versions, when you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
+ When you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
Formatting Types in .NET
Composite Formatting
@@ -3149,7 +3147,7 @@ The index of a format item is less than 0 (zero), or greater than or equal to th
object.
+ This method uses the [composite formatting feature](/dotnet/standard/base-types/composite-formatting) of .NET to convert the value of an object to its text representation and embed that representation in the current object.
The `format` parameter consists of zero or more runs of text intermixed with zero or more indexed placeholders, called format items, that correspond to `arg0` and `arg1`, the two objects in the parameter list of this method. The formatting process replaces each format item with the string representation of the corresponding object.
@@ -3193,7 +3191,7 @@ The index of a format item is less than 0 (zero), or greater than or equal to th
The index of a format item is less than 0 (zero), or greater than or equal to 2.
The length of the expanded string would exceed .
- In .NET Core and in the .NET Framework 4.0 and later versions, when you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
+ When you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
Formatting Types in .NET
Composite Formatting
@@ -3276,7 +3274,7 @@ The index of a format item is less than 0 (zero), or greater than or equal to th
object.
+ This method uses the [composite formatting feature](/dotnet/standard/base-types/composite-formatting) of .NET to convert the value of an object to its text representation and embed that representation in the current object.
The `format` parameter consists of zero or more runs of text intermixed with zero or more indexed placeholders, called format items, that correspond to objects in the parameter list of this method. The formatting process replaces each format item with the string representation of the corresponding object.
@@ -3330,7 +3328,7 @@ The index of a format item is less than 0 (zero), or greater than or equal to th
The index of a format item is less than 0 (zero), or greater than or equal to 2 (two).
The length of the expanded string would exceed .
- IIn .NET Core and in the .NET Framework 4.0 and later versions, when you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
+ IWhen you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
Formatting Types in .NET
Composite Formatting
@@ -3416,7 +3414,7 @@ The index of a format item is less than 0 (zero), or greater than or equal to th
object.
+ This method uses the [composite formatting feature](/dotnet/standard/base-types/composite-formatting) of .NET to convert the value of an object to its text representation and embed that representation in the current object.
The `format` parameter consists of zero or more runs of text intermixed with zero or more indexed placeholders, called format items, that correspond to `arg0` through `arg2`, the objects in the parameter list of this method. The formatting process replaces each format item with the string representation of the corresponding object.
@@ -3460,7 +3458,7 @@ The index of a format item is less than 0 (zero), or greater than or equal to th
The index of a format item is less than 0 (zero), or greater than or equal to 3.
The length of the expanded string would exceed .
- In .NET Core and in the .NET Framework 4.0 and later versions, when you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
+ When you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
Formatting Types in .NET
Composite Formatting
@@ -3545,7 +3543,7 @@ The index of a format item is less than 0 (zero), or greater than or equal to th
object.
+ This method uses the [composite formatting feature](/dotnet/standard/base-types/composite-formatting) of .NET to convert the value of an object to its text representation and embed that representation in the current object.
The `format` parameter consists of zero or more runs of text intermixed with zero or more indexed placeholders, called format items, that correspond to objects in the parameter list of this method. The formatting process replaces each format item with the string representation of the corresponding object.
@@ -3599,7 +3597,7 @@ The index of a format item is less than 0 (zero), or greater than or equal to th
The index of a format item is less than 0 (zero), or greater than or equal to 3 (three).
The length of the expanded string would exceed .
- In .NET Core and in the .NET Framework 4.0 and later versions, when you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
+ When you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
Formatting Types in .NET
Composite Formatting
@@ -4425,7 +4423,7 @@ The index of a format item is less than 0 (zero), or greater than or equal to th
Enlarging the value of this instance would exceed .
- In .NET Core and in the .NET Framework 4.0 and later versions, when you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
+ When you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
@@ -4493,7 +4491,7 @@ The index of a format item is less than 0 (zero), or greater than or equal to th
Enlarging the value of this instance would exceed .
- In .NET Core and in the .NET Framework 4.0 and later versions, when you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
+ When you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
@@ -5101,18 +5099,13 @@ The `Equals` method performs an ordinal comparison to determine whether the char
An object to compare with this instance, or .
Returns a value indicating whether this instance is equal to a specified object.
-
- On .NET (Core), if the characters in this instance and are equal; otherwise, .
- On .NET Framework, if this instance and have equal string, , and values; otherwise, .
-
+ if the characters in this instance and are equal; otherwise, .
, and values. The `Equals` method uses ordinal comparison to determine whether the strings are equal.
-
-**.NET Core 3.0 and later versions:** The current instance and `sb` are equal if the strings assigned to both objects are the same. To determine equality, the `Equals` method uses ordinal comparison. The and property values are not used in the comparison.
+The current instance and `sb` are equal if the strings assigned to both objects are the same. To determine equality, the `Equals` method uses ordinal comparison. The and property values are not used in the comparison.
## Examples
The following code uses the method to check whether two objects are equal. The method is called repeatedly after small changes are made to each object, and the results are displayed to the console.
@@ -5302,8 +5295,6 @@ foreach (ReadOnlyMemory chunk in sb.GetChunks())
is less than zero or greater than the length of this instance.
Enlarging the value of this instance would exceed .
-
- In the .NET Framework 3.5 Service Pack 1 and earlier versions, calls to this method threw an if inserting would cause the object's total length to exceed . Starting with the .NET Framework 4, the method throws an .
@@ -5365,8 +5356,6 @@ foreach (ReadOnlyMemory chunk in sb.GetChunks())
is less than zero or greater than the length of this instance.
Enlarging the value of this instance would exceed .
-
- In the .NET Framework 3.5 Service Pack 1 and earlier versions, calls to this method threw an if inserting would cause the object's total length to exceed . Starting with the .NET Framework 4, the method throws an .
@@ -5563,8 +5552,6 @@ foreach (ReadOnlyMemory chunk in sb.GetChunks())
is less than zero or greater than the length of this instance.
Enlarging the value of this instance would exceed .
-
- In the .NET Framework 3.5 Service Pack 1 and earlier versions, calls to this method threw an if inserting would cause the object's total length to exceed . Starting with the .NET Framework 4, the method throws an .
@@ -5626,8 +5613,6 @@ foreach (ReadOnlyMemory chunk in sb.GetChunks())
is less than zero or greater than the length of this instance.
Enlarging the value of this instance would exceed .
-
- In the .NET Framework 3.5 Service Pack 1 and earlier versions, calls to this method threw an if inserting would cause the object's total length to exceed . Starting with the .NET Framework 4, the method throws an .
@@ -5689,8 +5674,6 @@ foreach (ReadOnlyMemory chunk in sb.GetChunks())
is less than zero or greater than the length of this instance.
Enlarging the value of this instance would exceed .
-
- In the .NET Framework 3.5 Service Pack 1 and earlier versions, calls to this method threw an if inserting would cause the object's total length to exceed . Starting with the .NET Framework 4, the method throws an .
@@ -5752,8 +5735,6 @@ foreach (ReadOnlyMemory chunk in sb.GetChunks())
is less than zero or greater than the length of this instance.
Enlarging the value of this instance would exceed .
-
- In the .NET Framework 3.5 Service Pack 1 and earlier versions, calls to this method threw an if inserting would cause the object's total length to exceed . Starting with the .NET Framework 4, the method throws an .
@@ -5815,8 +5796,6 @@ foreach (ReadOnlyMemory chunk in sb.GetChunks())
is less than zero or greater than the length of this instance.
Enlarging the value of this instance would exceed .
-
- In the .NET Framework 3.5 Service Pack 1 and earlier versions, calls to this method threw an if inserting would cause the object's total length to exceed . Starting with the .NET Framework 4, the method throws an .
@@ -5888,8 +5867,6 @@ foreach (ReadOnlyMemory chunk in sb.GetChunks())
is less than zero or greater than the length of this instance.
Enlarging the value of this instance would exceed .
-
- In the .NET Framework 3.5 Service Pack 1 and earlier versions, calls to this method threw an if inserting would cause the object's total length to exceed . Starting with the .NET Framework 4, the method throws an .
@@ -6010,8 +5987,6 @@ The existing characters are shifted to make room for the character sequence in t
is less than zero or greater than the length of this instance.
Enlarging the value of this instance would exceed .
-
- In the .NET Framework 3.5 Service Pack 1 and earlier versions, calls to this method threw an if inserting would cause the object's total length to exceed . Starting with the .NET Framework 4, the method throws an .
@@ -6073,8 +6048,6 @@ The existing characters are shifted to make room for the character sequence in t
is less than zero or greater than the length of this instance.
Enlarging the value of this instance would exceed .
-
- In the .NET Framework 3.5 Service Pack 1 and earlier versions, calls to this method threw an if inserting would cause the object's total length to exceed . Starting with the .NET Framework 4, the method throws an .
@@ -6248,8 +6221,6 @@ The existing characters are shifted to make room for the character sequence in t
is less than zero or greater than the length of this instance.
Enlarging the value of this instance would exceed .
-
- In the .NET Framework 3.5 Service Pack 1 and earlier versions, calls to this method threw an if inserting would cause the object's total length to exceed . Starting with the .NET Framework 4, the method throws an .
@@ -6318,8 +6289,6 @@ The existing characters are shifted to make room for the character sequence in t
is less than zero or greater than the length of this instance.
Enlarging the value of this instance would exceed .
-
- In the .NET Framework 3.5 Service Pack 1 and earlier versions, calls to this method threw an if inserting would cause the object's total length to exceed . Starting with the .NET Framework 4, the method throws an .
@@ -6387,8 +6356,6 @@ The existing characters are shifted to make room for the character sequence in t
is less than zero or greater than the length of this instance.
Enlarging the value of this instance would exceed .
-
- In the .NET Framework 3.5 Service Pack 1 and earlier versions, calls to this method threw an if inserting would cause the object's total length to exceed . Starting with the .NET Framework 4, the method throws an .
@@ -6665,7 +6632,7 @@ The existing characters are shifted to make room for the character sequence in t
## Remarks
The maximum capacity for this implementation is . However, this value is implementation-specific and might be different in other or later implementations. You can explicitly set the maximum capacity of a object by calling the constructor.
-In .NET Core and in the .NET Framework 4.0 and later versions, when you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
+When you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
]]>
diff --git a/xml/System.Text/UTF7Encoding.xml b/xml/System.Text/UTF7Encoding.xml
index 84ca8ad59af..cb6b87fe046 100644
--- a/xml/System.Text/UTF7Encoding.xml
+++ b/xml/System.Text/UTF7Encoding.xml
@@ -63,7 +63,7 @@
> [!NOTE]
> does not provide error detection. For security reasons, the application should use , , or and enable error detection.
- For more information about the UTFs and other encodings supported by , see [Character Encoding in the .NET Framework](/dotnet/standard/base-types/character-encoding).
+ For more information about the UTFs and other encodings supported by , see [Character Encoding in .NET](/dotnet/standard/base-types/character-encoding).
The method determines how many bytes result in encoding a set of Unicode characters, and the method performs the actual encoding.
@@ -72,9 +72,7 @@
corresponds to the Windows code page 65000.
> [!NOTE]
-> The state of a UTF-7 encoded object is not preserved if the object is serialized and deserialized using different .NET Framework versions.
-
-
+> The state of a UTF-7 encoded object is not preserved if the object is serialized and deserialized using different .NET versions.
## Examples
The following code example demonstrates how to use a to encode a string of Unicode characters and store them in a byte array. Notice that when the byte array is decoded back to a string, no data is lost.
diff --git a/xml/System.Text/UTF8Encoding.xml b/xml/System.Text/UTF8Encoding.xml
index ba2caac82e3..7573324faa7 100644
--- a/xml/System.Text/UTF8Encoding.xml
+++ b/xml/System.Text/UTF8Encoding.xml
@@ -53,14 +53,14 @@
## Remarks
Encoding is the process of transforming a set of Unicode characters into a sequence of bytes. Decoding is the process of transforming a sequence of encoded bytes into a set of Unicode characters.
- UTF-8 is a Unicode encoding that represents each code point as a sequence of one to four bytes. Unlike the UTF-16 and UTF-32 encodings, the UTF-8 encoding does not require "endianness"; the encoding scheme is the same regardless of whether the processor is big-endian or little-endian. corresponds to the Windows code page 65001. For more information about the UTFs and other encodings supported by , see [Character Encoding in the .NET Framework](/dotnet/standard/base-types/character-encoding).
+ UTF-8 is a Unicode encoding that represents each code point as a sequence of one to four bytes. Unlike the UTF-16 and UTF-32 encodings, the UTF-8 encoding does not require "endianness"; the encoding scheme is the same regardless of whether the processor is big-endian or little-endian. corresponds to the Windows code page 65001. For more information about the UTFs and other encodings supported by , see [Character Encoding in .NET](/dotnet/standard/base-types/character-encoding).
You can instantiate a object in a number of ways, depending on whether you want to it to provide a byte order mark (BOM) and whether you want to enable error detection. The following table lists the constructors and the property that return a object.
-|Member|BOM|Error detection|
-|------------|---------|---------------------|
-||Yes|No (Replacement fallback)|
-||No|No (Replacement fallback)|
+| Member | BOM | Error detection |
+|----------------------------------------------------------------------|-----|---------------------------|
+| | Yes | No (Replacement fallback) |
+| | No | No (Replacement fallback) |
||Configurable|No (Replacement fallback)|
||Configurable|Configurable|
@@ -78,9 +78,7 @@
> To enable error detection and to make the class instance more secure, you should call the constructor and set the `throwOnInvalidBytes` parameter to `true`. With error detection enabled, a method that detects an invalid sequence of characters or bytes throws an exception. Without error detection, no exception is thrown, and the invalid sequence is generally ignored.
> [!NOTE]
-> The state of a UTF-8 encoded object is not preserved if the object is serialized and deserialized using different .NET Framework versions.
-
-
+> The state of a UTF-8 encoded object is not preserved if the object is serialized and deserialized using different .NET versions.
## Examples
The following example uses a object to encode a string of Unicode characters and store them in a byte array. The Unicode string includes two characters, Pi (U+03A0) and Sigma (U+03A3), that are outside the ASCII character range. When the encoded byte array is decoded back to a string, the Pi and Sigma characters are still present.
diff --git a/xml/System.Text/UnicodeEncoding.xml b/xml/System.Text/UnicodeEncoding.xml
index d3c0387bde1..fb28df864dd 100644
--- a/xml/System.Text/UnicodeEncoding.xml
+++ b/xml/System.Text/UnicodeEncoding.xml
@@ -62,17 +62,14 @@
The [Unicode Standard](https://www.unicode.org/) assigns a code point (a number) to each character in every supported script. A Unicode Transformation Format (UTF) is a way to encode that code point. The [Unicode Standard](https://www.unicode.org/) uses the following UTFs:
- UTF-8, which represents each code point as a sequence of one to four bytes.
-
- UTF-16, which represents each code point as a sequence of one to two 16-bit integers.
-
- UTF-32, which represents each code point as a 32-bit integer.
- For more information about the UTFs and other encodings supported by , see [Character Encoding in the .NET Framework](/dotnet/standard/base-types/character-encoding).
+ For more information about the UTFs and other encodings supported by , see [Character Encoding in .NET](/dotnet/standard/base-types/character-encoding).
The class represents a UTF-16 encoding. The encoder can use either big endian byte order (most significant byte first) or little endian byte order (least significant byte first). For example, the Latin Capital Letter A (code point U+0041) is serialized as follows (in hexadecimal):
- Big endian byte order: 00 00 00 41
-
- Little endian byte order: 41 00 00 00
It is generally more efficient to store Unicode characters using the native byte order of a particular platform. For example, it is better to use the little endian byte order on little endian platforms, such as Intel computers. The class corresponds to the Windows code pages 1200 (little endian byte order) and 1201 (big endian byte order). You can determine the "endianness" of a particular architecture by calling the method.
@@ -86,9 +83,9 @@
You can instantiate a object in a number of ways, depending on whether you want to it to provide a byte order mark (BOM), whether you want big-endian or little-endian encoding, and whether you want to enable error detection. The following table lists the constructors and the properties that return a object.
-|Member|Endianness|BOM|Error detection|
-|------------|----------------|---------|---------------------|
-||Big-endian|Yes|No (Replacement fallback)|
+| Member | Endianness | BOM | Error detection |
+|-----------------------------------------------|------------|-----|---------------------------|
+| | Big-endian | Yes | No (Replacement fallback) |
||Little-endian|Yes|No (Replacement fallback)|
||Little-endian|Yes|No (Replacement fallback)|
||Configurable|Configurable|No (Replacement fallback)|
@@ -100,8 +97,6 @@
For an encoder or decoder that is able to save state information when encoding or decoding data that spans multiple blocks (such as string of 1 million characters that is encoded in 100,000-character segments), use the and properties, respectively.
-
-
## Examples
The following example demonstrates how to encode a string of Unicode characters into a byte array by using a object. The byte array is decoded into a string to demonstrate that there is no loss of data.
From 52a49d1dc9389534ba09897cdc08df8a285daf1b Mon Sep 17 00:00:00 2001
From: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Date: Fri, 29 May 2026 11:29:33 -0700
Subject: [PATCH 2/6] Apply suggestions from code review
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
---
xml/System.Text.Json/JsonElement.xml | 2 +-
xml/System.Text/CodePagesEncodingProvider.xml | 2 +-
xml/System.Text/StringBuilder.xml | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/xml/System.Text.Json/JsonElement.xml b/xml/System.Text.Json/JsonElement.xml
index 662c3f514e7..903d5f2b04b 100644
--- a/xml/System.Text.Json/JsonElement.xml
+++ b/xml/System.Text.Json/JsonElement.xml
@@ -2081,7 +2081,7 @@ This method does not parse the contents of a JSON string value.
This method does not parse the contents of a JSON string value.
-This method does not return `false` for values larger than or smaller than ). Instead, it returns `true` and assigns or to the `value` argument.
+This method does not return `false` for values larger than or smaller than . Instead, it returns `true` and assigns or to the `value` argument.
]]>
diff --git a/xml/System.Text/CodePagesEncodingProvider.xml b/xml/System.Text/CodePagesEncodingProvider.xml
index 0e3bf683396..f9beb242a73 100644
--- a/xml/System.Text/CodePagesEncodingProvider.xml
+++ b/xml/System.Text/CodePagesEncodingProvider.xml
@@ -57,7 +57,7 @@ Modern .NET supports only the following encodings:
- UTF-7 (code page 65000), which is returned by the property.
- UTF-8 (code page 65001), which is returned by the property.
- UTF-16 and UTF-16LE (code page 1200), which is returned by the property.
-- UTF-16BE (code page 1201), which is instantiated by calling the or constructor with a `bigEndian` value of `true`.
+- UTF-16BE (code page 1201), which is instantiated by calling the or constructor with a `bigEndian` value of `true`.
- UTF-32 and UTF-32LE (code page 12000), which is returned by the property.
- UTF-32BE (code page 12001), which is instantiated by calling an constructor that has a `bigEndian` parameter and providing a value of `true` in the method call.
diff --git a/xml/System.Text/StringBuilder.xml b/xml/System.Text/StringBuilder.xml
index 883726682da..1817a82a911 100644
--- a/xml/System.Text/StringBuilder.xml
+++ b/xml/System.Text/StringBuilder.xml
@@ -3328,7 +3328,7 @@ The index of a format item is less than 0 (zero), or greater than or equal to th
The index of a format item is less than 0 (zero), or greater than or equal to 2 (two).
The length of the expanded string would exceed .
- IWhen you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
+ When you instantiate the object by calling the constructor, both the length and the capacity of the instance can grow beyond the value of its property. This can occur particularly when you call the and methods to append small strings.
Formatting Types in .NET
Composite Formatting
From 5eafdbac59b4defcee904d7853428f22185f1afe Mon Sep 17 00:00:00 2001
From: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Date: Fri, 29 May 2026 11:30:29 -0700
Subject: [PATCH 3/6] Apply suggestion from @gewarren
---
xml/System.Text/EncodingProvider.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xml/System.Text/EncodingProvider.xml b/xml/System.Text/EncodingProvider.xml
index 6d330135c17..d73344b0f89 100644
--- a/xml/System.Text/EncodingProvider.xml
+++ b/xml/System.Text/EncodingProvider.xml
@@ -76,7 +76,7 @@ Modern .NET supports only the following encodings:
- UTF-7 (code page 65000), which is returned by the property.
- UTF-8 (code page 65001), which is returned by the property.
- UTF-16 and UTF-16LE (code page 1200), which is returned by the property.
-- UTF-16BE (code page 1201), which is instantiated by calling the or constructor with a `bigEndian` value of `true`.
+- UTF-16BE (code page 1201), which is instantiated by calling the or constructor with a `bigEndian` value of `true`.
- UTF-32 and UTF-32LE (code page 12000), which is returned by the property.
- UTF-32BE (code page 12001), which is instantiated by calling an constructor that has a `bigEndian` parameter and providing a value of `true` in the method call.
From 44094014f03f2017816830efed2c751a68699af4 Mon Sep 17 00:00:00 2001
From: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Date: Fri, 29 May 2026 13:37:38 -0700
Subject: [PATCH 4/6] remove remarks for obsolete method
---
xml/System.Text.RegularExpressions/Regex.xml | 49 ++------------------
1 file changed, 4 insertions(+), 45 deletions(-)
diff --git a/xml/System.Text.RegularExpressions/Regex.xml b/xml/System.Text.RegularExpressions/Regex.xml
index 8c399bfcba4..89292b8a774 100644
--- a/xml/System.Text.RegularExpressions/Regex.xml
+++ b/xml/System.Text.RegularExpressions/Regex.xml
@@ -890,10 +890,8 @@
[!NOTE]
-> On .NET Core and .NET 5+, calls to the `Regex.CompileToAssembly` method throw a . Writing out an assembly is not supported.
+> In modern .NET versions, the `Regex.CompileToAssembly` method throws a . Writing out an assembly is not supported.
]]>
@@ -945,37 +943,8 @@
An array that describes the regular expressions to compile.
The file name of the assembly.
-
- Compiles one or more specified objects to a named assembly.
-
-
- method generates a .NET assembly in which each regular expression defined in the `regexinfos` array is represented by a class. Typically, the method is called from a separate application that generates an assembly of compiled regular expressions. Each regular expression included in the assembly has the following characteristics:
-
-- It is derived from the class.
-- It is assigned the fully qualified name that is defined by the `fullnamespace` and `name` parameters of its corresponding object.
-- It has a default (or parameterless) constructor.
-
- Ordinarily, the code that instantiates and uses the compiled regular expression is found in an assembly or application that is separate from the code that creates the assembly.
-
-## Examples
- The following example creates an assembly named RegexLib.dll. The assembly includes two compiled regular expressions. The first, `Utilities.RegularExpressions.DuplicatedString`, matches two identical contiguous words. The second, `Utilities.RegularExpressions.EmailAddress`, checks whether a string has the correct format to be an email address.
-
- :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/CompileToAssembly/Compile1.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/CompileToAssembly/Compile1.vb" id="Snippet1":::
-
- The regular expression that checks a string for duplicate words is then instantiated and used by the following example.
-
- :::code language="csharp" source="~/snippets/csharp/System.Text.RegularExpressions/Regex/CompileToAssembly/Compile2.cs" id="Snippet2":::
- :::code language="vb" source="~/snippets/visualbasic/System.Text.RegularExpressions/Regex/CompileToAssembly/Compile2.vb" id="Snippet2":::
-
- Successful compilation of this second example requires a reference to RegexLib.dll (the assembly created by the first example) to be added to the project.
-
- ]]>
-
+ Compiles one or more specified objects to a named assembly.
+ To be added.
The value of the parameter's property is an empty or null string.
-or-
@@ -983,17 +952,7 @@ The contains invalid syntax.
or is .
-
- If you are developing on a system that has .NET Framework 4.5 or its point releases installed, you target .NET Framework 4, and you use the method to create an assembly that contains compiled regular expressions. Trying to use one of the regular expressions in that assembly on a system that has .NET Framework 4 throws an exception. To work around this problem, you can do either of the following:
-
-- Build the assembly that contains the compiled regular expressions on a system that has .NET Framework 4 instead of later versions installed.
-
-- Instead of calling and retrieving the compiled regular expression from an assembly, use either static or instance methods with the option when you instantiate a object or call a regular expression pattern matching method.
-
- Compilation and Reuse
-
- Creating an assembly of compiled regular expressions is not supported.
-
+ Creating an assembly of compiled regular expressions is not supported.
From 438cd3ff47545f4314b9bbc9636f47003eb6967e Mon Sep 17 00:00:00 2001
From: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Date: Fri, 29 May 2026 13:53:51 -0700
Subject: [PATCH 5/6] fix syntax
---
xml/System.Text/StringBuilder.xml | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/xml/System.Text/StringBuilder.xml b/xml/System.Text/StringBuilder.xml
index 1817a82a911..ab8624a5411 100644
--- a/xml/System.Text/StringBuilder.xml
+++ b/xml/System.Text/StringBuilder.xml
@@ -5287,16 +5287,13 @@ foreach (ReadOnlyMemory chunk in sb.GetChunks())
is used to get a string representation of `value`. Existing characters are shifted to make room for the new text. The capacity is adjusted as needed.
+ is used to get a string representation of `value`. Existing characters are shifted to make room for the new text. The capacity is adjusted as needed.
]]>
is less than zero or greater than the length of this instance.
Enlarging the value of this instance would exceed .
-
-
From 79216df4290cf8b86c3514531ff6de5e91f4cebd Mon Sep 17 00:00:00 2001
From: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Date: Fri, 29 May 2026 14:11:39 -0700
Subject: [PATCH 6/6] fix tags
---
xml/System.Text/StringBuilder.xml | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/xml/System.Text/StringBuilder.xml b/xml/System.Text/StringBuilder.xml
index ab8624a5411..e7a95437c29 100644
--- a/xml/System.Text/StringBuilder.xml
+++ b/xml/System.Text/StringBuilder.xml
@@ -5294,6 +5294,7 @@ foreach (ReadOnlyMemory chunk in sb.GetChunks())
is less than zero or greater than the length of this instance.
Enlarging the value of this instance would exceed .
+
@@ -5353,7 +5354,6 @@ foreach (ReadOnlyMemory chunk in sb.GetChunks())
is less than zero or greater than the length of this instance.
Enlarging the value of this instance would exceed .
-
@@ -5549,7 +5549,6 @@ foreach (ReadOnlyMemory chunk in sb.GetChunks())
is less than zero or greater than the length of this instance.
Enlarging the value of this instance would exceed .
-
@@ -5610,7 +5609,6 @@ foreach (ReadOnlyMemory chunk in sb.GetChunks())
is less than zero or greater than the length of this instance.
Enlarging the value of this instance would exceed .
-
@@ -5671,7 +5669,6 @@ foreach (ReadOnlyMemory chunk in sb.GetChunks())
is less than zero or greater than the length of this instance.
Enlarging the value of this instance would exceed .
-
@@ -5732,7 +5729,6 @@ foreach (ReadOnlyMemory chunk in sb.GetChunks())
is less than zero or greater than the length of this instance.
Enlarging the value of this instance would exceed .
-
@@ -5793,7 +5789,6 @@ foreach (ReadOnlyMemory chunk in sb.GetChunks())
is less than zero or greater than the length of this instance.
Enlarging the value of this instance would exceed .
-
@@ -5864,7 +5859,6 @@ foreach (ReadOnlyMemory chunk in sb.GetChunks())
is less than zero or greater than the length of this instance.
Enlarging the value of this instance would exceed .
-
@@ -5984,7 +5978,6 @@ The existing characters are shifted to make room for the character sequence in t
is less than zero or greater than the length of this instance.
Enlarging the value of this instance would exceed .
-
@@ -6045,7 +6038,6 @@ The existing characters are shifted to make room for the character sequence in t
is less than zero or greater than the length of this instance.
Enlarging the value of this instance would exceed .
-
@@ -6218,7 +6210,6 @@ The existing characters are shifted to make room for the character sequence in t
is less than zero or greater than the length of this instance.
Enlarging the value of this instance would exceed .
-
@@ -6286,7 +6277,6 @@ The existing characters are shifted to make room for the character sequence in t
is less than zero or greater than the length of this instance.
Enlarging the value of this instance would exceed .
-
@@ -6353,7 +6343,6 @@ The existing characters are shifted to make room for the character sequence in t
is less than zero or greater than the length of this instance.
Enlarging the value of this instance would exceed .
-