Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion xml/System/Char.xml
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ The <xref:System.Char> structure represents Unicode code points by using UTF-16

If you aren't familiar with Unicode, scalar values, code points, surrogate pairs, UTF-16, and the <xref:System.Text.Rune> type, see [Introduction to character encoding in .NET](/dotnet/standard/base-types/character-encoding-introduction).

This article examines the relationship between a <xref:System.Char> object and a character and discuss some common tasks performed with <xref:System.Char> instances. We recommend that you consider the <xref:System.Text.Rune> type, introduced in .NET Core 3.0, as an alternative to <xref:System.Char> for performing some of these tasks.
This article examines the relationship between a <xref:System.Char> object and a character and discusses some common tasks performed with <xref:System.Char> instances. We recommend that you consider the <xref:System.Text.Rune> type as an alternative to <xref:System.Char> for performing some of these tasks.

## Char objects, Unicode characters, and strings

Expand Down
6 changes: 3 additions & 3 deletions xml/System/Environment.xml
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ Calling the `Environment.FailFast` method to terminate execution of an applicati
## Remarks
The first element in the array contains the file name of the executing program. If the file name is not available, the first element is equal to <xref:System.String.Empty?displayProperty=nameWithType>. The remaining elements contain any additional tokens entered on the command line.

In .NET 5 and later versions, for single-file publishing, the first element is the name of the host executable.
For single-file publishing, the first element is the name of the host executable.

The program file name can, but is not required to, include path information.

Expand Down Expand Up @@ -1819,7 +1819,7 @@ By using this property, you can determine whether to access static variables in

<xref:System.Environment.OSVersion?displayProperty=nameWithType> returns an OS version that may be incorrect when an application runs under Windows compatibility mode. For more information, see [GetVersionExA function remarks](/windows/win32/api/sysinfoapi/nf-sysinfoapi-getversionexa#remarks).

In .NET 5 and later versions, <xref:System.Environment.OSVersion?displayProperty=nameWithType> returns the actual OS version in compatibility modes specified by the [application manifest](/windows/win32/sysinfo/targeting-your-application-at-windows-8-1). For more information, see [Environment.OSVersion returns the correct operating system version](/dotnet/core/compatibility/core-libraries/5.0/environment-osversion-returns-correct-version).
<xref:System.Environment.OSVersion?displayProperty=nameWithType> returns the actual OS version in compatibility modes specified by the [application manifest](/windows/win32/sysinfo/targeting-your-application-at-windows-8-1). For more information, see [Environment.OSVersion returns the correct operating system version](/dotnet/core/compatibility/core-libraries/5.0/environment-osversion-returns-correct-version).

To identify the operating system platform, for example, Linux or Windows, you can use the <xref:System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform*?displayProperty=nameWithType> method.

Expand Down Expand Up @@ -1913,7 +1913,7 @@ To identify the operating system platform, for example, Linux or Windows, you ca
<format type="text/markdown"><![CDATA[

## Remarks
On Linux and macOS systems for all .NET versions and on Windows systems starting with .NET 6, this API returns the minimum of:
On Linux, macOS, and Windows systems, this API returns the minimum of:
- The number of logical processors on the machine.
- If the process is running with CPU affinity, the number of processors that the process is affinitized to.
- If the process is running with a CPU utilization limit, the CPU utilization limit rounded up to the next whole number.
Expand Down
12 changes: 1 addition & 11 deletions xml/System/GC.xml
Original file line number Diff line number Diff line change
Expand Up @@ -226,15 +226,7 @@ The following example uses several GC methods to get generation and memory infor
<param name="pinned">Specifies whether the allocated array must be pinned.</param>
<summary>Allocates an array.</summary>
<returns>An array object.</returns>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks

In .NET 7 and earlier versions: If pinned is set to `true`, `T` must not be a reference type or a type that contains object references.

]]></format>
</remarks>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="AllocateUninitializedArray&lt;T&gt;">
Expand Down Expand Up @@ -285,8 +277,6 @@ In .NET 7 and earlier versions: If pinned is set to `true`, `T` must not be a re

## Remarks

In .NET 7 and earlier versions: If pinned is set to `true`, `T` must not be a reference type or a type that contains object references.

Skipping zero-initialization is a security risk. The uninitialized array can contain invalid valuetype instances or sensitive information created by other parts of the application.
The code operating on uninitialized arrays should be heavily scrutinized to ensure that the uninitialized data is never read.
Comment on lines 278 to 281

Expand Down
2 changes: 1 addition & 1 deletion xml/System/Guid.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,7 @@

On Windows, this function wraps a call to the [CoCreateGuid](/windows/win32/api/combaseapi/nf-combaseapi-cocreateguid) function. The generated GUID contains 122 bits of strong entropy.

On non-Windows platforms, starting with .NET 6, this function calls the OS's underlying cryptographically secure pseudo-random number generator (CSPRNG) to generate 122 bits of strong entropy. In previous versions of .NET, the entropy is not guaranteed to be generated by a CSPRNG.
On non-Windows platforms, this function calls the OS's underlying cryptographically secure pseudo-random number generator (CSPRNG) to generate 122 bits of strong entropy.

It is recommended that applications __not__ use the _NewGuid_ method for cryptographic purposes. First, since a Version 4 UUID has a partially predictable bit pattern, the _NewGuid_ function cannot serve as a proper cryptographic pseudo-random function (PRF). If the output of _NewGuid_ is given to a cryptographic component that requires its input to be generated by a proper PRF, the cryptographic component may not be able to maintain its security properties. Second, _NewGuid_ utilizes at most 122 bits of entropy, regardless of platform. Some cryptographic components set a minimum entropy level on their inputs as a matter of policy. Such policies often set the minimum entropy level at 128 bits or higher. Passing the output of _NewGuid_ to such a routine may violate its policy.

Expand Down
2 changes: 1 addition & 1 deletion xml/System/IAsyncDisposable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ If your application uses an object that implements `IAsyncDisposable`, you shoul

You might implement `IAsyncDisposable` in the following situations:

- When developing an asynchronous enumerator that owns unmanaged resources. Asynchronous enumerators are used with the C# 8.0 async streams feature. For more information about async streams, see [Tutorial: Generate and consume async streams using C# 8.0 and .NET Core 3.0](/dotnet/csharp/tutorials/generate-consume-asynchronous-stream).
- When developing an asynchronous enumerator that owns unmanaged resources. Asynchronous enumerators are used with the C# 8.0 async streams feature. For more information about async streams, see [Tutorial: Generate and consume async streams](/dotnet/csharp/tutorials/generate-consume-asynchronous-stream).
- When your class owns unmanaged resources and releasing them requires a resource-intensive I/O operation, such as flushing the contents of an intermediate buffer into a file or sending a packet over a network to close a connection.

Use the <xref:System.IAsyncDisposable.DisposeAsync*> method to perform whatever cleanup is necessary after using the unmanaged resources, such as freeing, releasing, or resetting the unmanaged resources. For more information, see [Implement a DisposeAsync method](/dotnet/standard/garbage-collection/implementing-disposeasync).
Expand Down
8 changes: 4 additions & 4 deletions xml/System/IntPtr.xml
Original file line number Diff line number Diff line change
Expand Up @@ -262,11 +262,11 @@
> [!NOTE]
> Using <xref:System.IntPtr> as a pointer or a handle is error prone and unsafe. It is simply an integer type that can be used as an interchange format for pointers and handles due to being the same size. Outside of specific interchange requirements, such as for passing data to a language that doesn't support pointers, a correctly typed pointer should be used to represent pointers and <xref:System.Runtime.InteropServices.SafeHandle> should be used to represent handles.

This type implements the <xref:System.Runtime.Serialization.ISerializable> and <xref:System.IFormattable> interfaces. In .NET 7 and later versions, this type also implements the <xref:System.Numerics.IBinaryInteger`1>, <xref:System.Numerics.IMinMaxValue`1>, and <xref:System.Numerics.ISignedNumber`1> interfaces.
This type implements the <xref:System.Runtime.Serialization.ISerializable>, <xref:System.IFormattable>, <xref:System.Numerics.IBinaryInteger`1>, <xref:System.Numerics.IMinMaxValue`1>, and <xref:System.Numerics.ISignedNumber`1> interfaces.

In C# starting from version 9.0, you can use the built-in `nint` type to define native-sized integers. This type is represented by the <xref:System.IntPtr> type internally and provides operations and conversions that are appropriate for integer types. For more information, see [nint and nuint types](/dotnet/csharp/language-reference/builtin-types/integral-numeric-types).

In C# starting from version 11 and when targeting the .NET 7 or later runtime, `nint` is an alias for <xref:System.IntPtr> in the same way that `int` is an alias for <xref:System.Int32>.
In C# starting from version 11, `nint` is an alias for <xref:System.IntPtr> in the same way that `int` is an alias for <xref:System.Int32>.

## Examples

Expand Down Expand Up @@ -1740,7 +1740,7 @@ For <xref:System.Numerics.IFloatingPointIeee754`1> this method matches the IEEE

The addition operation does not throw an exception if the result is too large to represent as a signed integer in the executing process. Instead, it is performed in an unchecked context.

In C# starting from version 11 and when targeting the .NET 7 or later runtime, this API is only accessible via reflection. The addition operator is directly recognized by the language and will follow the normal language behavior for addition operations, including overflowing in a `checked` context if the result is too large to represent.
In C# starting from version 11, this API is only accessible via reflection. The addition operator is directly recognized by the language and will follow the normal language behavior for addition operations, including overflowing in a `checked` context if the result is too large to represent.

The equivalent method for this operator is <xref:System.IntPtr.Add(System.IntPtr,System.Int32)?displayProperty=nameWithType>]]></format>
</remarks>
Expand Down Expand Up @@ -2236,7 +2236,7 @@ For <xref:System.Numerics.IFloatingPointIeee754`1> this method matches the IEEE

The subtraction operation does not throw an exception if the result is too small to represent as a signed integer in the executing process. Instead, it is performed in an unchecked context.

In C# starting from version 11 and when targeting the .NET 7 or later runtime, this API is only accessible via reflection. The subtraction operator is directly recognized by the language and will follow the normal language behavior for subtraction operations, including overflowing in a `checked` context if the result is too small to represent.
In C# starting from version 11, this API is only accessible via reflection. The subtraction operator is directly recognized by the language and will follow the normal language behavior for subtraction operations, including overflowing in a `checked` context if the result is too small to represent.

The equivalent method for this operator is <xref:System.IntPtr.Subtract(System.IntPtr,System.Int32)?displayProperty=nameWithType>]]></format>
</remarks>
Expand Down
4 changes: 2 additions & 2 deletions xml/System/MarshalByRefObject.xml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@

## Remarks

This method is marked obsolete starting in .NET 5.
This method is obsolete.

]]></format>
</remarks>
Expand Down Expand Up @@ -216,7 +216,7 @@ This method is marked obsolete starting in .NET 5.

## Remarks

This method is marked obsolete starting in .NET 5.
This method is obsolete.

]]></format>
</remarks>
Expand Down
10 changes: 1 addition & 9 deletions xml/System/String.xml
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,6 @@ Each character in a string has an associated Unicode character category, which i

.NET maintains its own table of characters and their corresponding categories, which ensures that a specific version of a .NET implementation running on different platforms returns identical character category information. On all .NET versions and across all OS platforms, character category information is provided by the [Unicode Character Database](https://www.unicode.org/ucd/).

The following table lists .NET versions and the versions of the Unicode Standard on which their character categories are based.

| .NET version | Version of the Unicode Standard |
|---------------|-----------------------------------------------------------------------------------------|
| .NET Core 2.1 | [The Unicode Standard, Version 8.0.0](https://www.unicode.org/versions/Unicode8.0.0/) |
| .NET Core 3.1 | [The Unicode Standard, Version 11.0.0](https://www.unicode.org/versions/Unicode11.0.0/) |
| .NET 5 | [The Unicode Standard, Version 13.0.0](https://www.unicode.org/versions/Unicode13.0.0/) |

In addition, .NET supports string comparison and sorting based on the Unicode standard. String comparison and sorting information is provided by [International Components for Unicode](https://icu.unicode.org/) libraries (except on Windows versions prior to Windows 10 May 2019 Update).

## Embedded null characters
Expand Down Expand Up @@ -5572,7 +5564,7 @@ If you are new to the `String.Format` method, see <see href="/dotnet/fundamental

## Examples

Numerous examples that call the <xref:System.String.Format*> method are interspersed throughout this article. You can also download a complete set of `String.Format` examples, which are included a [.NET Core project for C#](/samples/dotnet/samples/string-format/).
Numerous examples that call the <xref:System.String.Format*> method are interspersed throughout this article. You can also download a complete set of `String.Format` examples, which are included a [.NET project for C#](/samples/dotnet/samples/string-format/).

The following are some of the examples included in the article:

Expand Down
10 changes: 5 additions & 5 deletions xml/System/TimeZoneInfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1828,13 +1828,13 @@
The `id` parameter must correspond exactly to the time zone's identifier in length, but not in case, for a successful match to occur; that is, the comparison of `id` with time zone identifiers is case-insensitive. If you want to retrieve time zone objects based on partial matches, you can write custom procedures that work with the read-only collection of <xref:System.TimeZoneInfo> objects returned by the <xref:System.TimeZoneInfo.GetSystemTimeZones*> method.

On Windows systems, `FindSystemTimeZoneById` tries to match `id` to the subkey names of the HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Time Zones branch of the registry.
Starting with .NET 6, Windows systems also support IANA time zone identifiers (such as "America/Los_Angeles" or "Pacific/Auckland"), providing cross-platform time zone resolution. IANA IDs are supported on Windows only if NLS isn't enabled and globalization invariant mode isn't enabled.
Windows systems also support IANA time zone identifiers (such as "America/Los_Angeles" or "Pacific/Auckland"), providing cross-platform time zone resolution. IANA IDs are supported on Windows only if NLS isn't enabled and globalization invariant mode isn't enabled.
On Linux and macOS, it uses time zone information available in the [ICU Library](https://unicode-org.github.io/icu/userguide/datetime/timezone/).
If the registry or the library does not have the information for the time zone you desire, you can create a particular time zone either by calling one of the overloads of the <xref:System.TimeZoneInfo.CreateCustomTimeZone*> method or by calling <xref:System.TimeZoneInfo.FromSerializedString*> to deserialize a <xref:System.TimeZoneInfo> object that represents the required time zone.
However, time zones created by these method calls are not system-defined time and cannot be retrieved using the <xref:System.TimeZoneInfo.FindSystemTimeZoneById*> method.
These custom time zones can be accessed only through the object reference returned by the <xref:System.TimeZoneInfo.CreateCustomTimeZone*> or <xref:System.TimeZoneInfo.FromSerializedString*> method call.

In .NET 7 and earlier versions, this method returns a new <xref:System.TimeZoneInfo> instance for each method call. This might impact performance in applications that call the `FindSystemTimeZoneById` method repeatedly with the same identifier. (In .NET 8 and later versions, this method always returns a cached <xref:System.TimeZoneInfo> instance.)
This method always returns a cached <xref:System.TimeZoneInfo> instance.

## Examples

Expand Down Expand Up @@ -3474,7 +3474,7 @@ The time zone identifier is a key string that uniquely identifies a particular t

## Remarks

This API is exclusively supported on .NET 6 and later versions, and only when the application utilizes the ICU library.
This API is supported only when the application utilizes the ICU library.
However, in .NET, the ICU library is not always used by default, particularly in the following scenarios:

- When the application runs on an operating system that does not have the ICU library, and the app does not utilize the [app-local ICU](/dotnet/core/extensions/globalization-icu#app-local-icu) feature.
Expand Down Expand Up @@ -3540,7 +3540,7 @@ If the application is running on a Windows OS version that lacks the ICU library

## Remarks

This API is exclusively supported on .NET 6.0 and later versions. It is also supported when the application utilizes the ICU library, otherwise the API will fail.
This API is supported only when the application utilizes the ICU library; otherwise, the API fails.
However, in .NET, the ICU library is not always used by default, particularly in the following scenarios:

- When the application runs on an operating system that does not have the ICU library, and the app does not utilize the [APP-Local ICU](/dotnet/core/extensions/globalization-icu#app-local-icu) feature.
Expand Down Expand Up @@ -3606,7 +3606,7 @@ If the application is running on a Windows OS version that lacks the ICU library

## Remarks

This API is exclusively supported on .NET 6.0 and later versions. It is also supported when the application utilizes the ICU library, otherwise the API will fail.
This API is supported only when the application utilizes the ICU library; otherwise, the API fails.
However, in .NET, the ICU library is not always used by default, particularly in the following scenarios:

- When the application runs on an operating system that does not have the ICU library, and the app does not utilize the [App-local ICU](/dotnet/core/extensions/globalization-icu#app-local-icu) feature.
Expand Down
Loading
Loading