Skip to content

Merge main into live #11662

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Aug 6, 2025
Merged
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
4 changes: 4 additions & 0 deletions .github/policies/label-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ configuration:
label: 'area-Extensions-Options'
- labelAdded:
label: 'area-Extensions-Primitives'
- labelAdded:
label: 'area-Infrastructure'
- labelAdded:
label: 'area-System.Buffers'
- labelAdded:
Expand Down Expand Up @@ -120,6 +122,8 @@ configuration:
label: 'area-System.Resources'
- labelAdded:
label: 'area-System.Runtime'
- labelAdded:
label: 'area-System.Runtime.InteropServices'
- labelAdded:
label: 'area-System.Security'
- labelAdded:
Expand Down
9 changes: 6 additions & 3 deletions snippets/csharp/System/String/IndexOfAny/IndexOfAny1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@ public static void Run()
char[] chars = { 'a', 'e', 'i', 'o', 'u', 'y',
'A', 'E', 'I', 'O', 'U', 'Y' };
String s = "The long and winding road...";
Console.WriteLine($"The first vowel in \n {s}\n" +
$"is found at index {s.IndexOfAny(chars)}");
Console.WriteLine($"""
The first vowel in
'{s}'
is found at index {s.IndexOfAny(chars)}
""");

// The example displays the following output:
// The first vowel in
// The long and winding road...
// 'The long and winding road...'
// is found at index 2
// </Snippet1>
}
Expand Down
6 changes: 4 additions & 2 deletions snippets/csharp/System/String/IndexOfAny/ixany2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ public static void Run()
Console.WriteLine();
Console.WriteLine("The first character occurrence " +
$"from position {start} to {str.Length - 1}:");
Console.WriteLine($"{Environment.NewLine}{br1}{Environment.NewLine}" +
$"{br2}{Environment.NewLine}{str}{Environment.NewLine}");
Console.WriteLine($"""
{Environment.NewLine}{br1}{Environment.NewLine}
{br2}{Environment.NewLine}{str}{Environment.NewLine}
""");
Console.Write($"A character in '{target}' occurs at position: ");

at = str.IndexOfAny(anyOf, start);
Expand Down
6 changes: 4 additions & 2 deletions snippets/csharp/System/String/IndexOfAny/ixany3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ public static void Run()
Console.WriteLine();
Console.WriteLine("The first character occurrence from " +
$"position {start} for {count} characters:");
Console.WriteLine($"{Environment.NewLine}{br1}{Environment.NewLine}{br2}" +
$"{Environment.NewLine}{str}{Environment.NewLine}");
Console.WriteLine($"""
{Environment.NewLine}{br1}{Environment.NewLine}{br2}
{Environment.NewLine}{str}{Environment.NewLine}
""");
Console.Write($"A character in '{target}' occurs at position: ");

int at = str.IndexOfAny(anyOf, start, count);
Expand Down
2 changes: 1 addition & 1 deletion xml/System.Runtime.InteropServices/CLong.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
</Parameters>
<Docs>
<param name="value">The integer value.</param>
<summary>Constructs an instance from a native sized integer.</summary>
<summary>Constructs an instance from a native-sized integer.</summary>
<remarks>To be added.</remarks>
<exception cref="T:System.OverflowException">
<paramref name="value" /> is outside the range of the underlying storage type.</exception>
Expand Down
2 changes: 1 addition & 1 deletion xml/System.Runtime.InteropServices/CULong.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
</Parameters>
<Docs>
<param name="value">The integer value.</param>
<summary>Constructs an instance from a native sized unsigned integer.</summary>
<summary>Constructs an instance from a native-sized unsigned integer.</summary>
<remarks>To be added.</remarks>
<exception cref="T:System.OverflowException">
<paramref name="value" /> is outside the range of the underlying storage type.</exception>
Expand Down
10 changes: 5 additions & 5 deletions xml/System.Runtime.InteropServices/Marshal.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9245,7 +9245,7 @@ On .NET 6 and later versions, this method is functionally equivalent to <xref:Sy
<AssemblyVersion>4.2.0.0</AssemblyVersion>
</AssemblyInfo>
<Docs>
<summary>Reads a processor native sized integer from unmanaged memory. Reading from unaligned memory locations is supported.</summary>
<summary>Reads a processor native-sized integer from unmanaged memory. Reading from unaligned memory locations is supported.</summary>
</Docs>
</MemberGroup>
<Member MemberName="ReadIntPtr">
Expand Down Expand Up @@ -9393,7 +9393,7 @@ On .NET 6 and later versions, this method is functionally equivalent to <xref:Sy
<Docs>
<param name="ptr">The base address in unmanaged memory from which to read.</param>
<param name="ofs">An additional byte offset, which is added to the <paramref name="ptr" /> parameter before reading.</param>
<summary>Reads a processor native sized integer at a given offset from unmanaged memory.</summary>
<summary>Reads a processor native-sized integer at a given offset from unmanaged memory.</summary>
<returns>The integer read from unmanaged memory at the given offset.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
Expand Down Expand Up @@ -9488,7 +9488,7 @@ On .NET 6 and later versions, this method is functionally equivalent to <xref:Sy
<Docs>
<param name="ptr">The base address in unmanaged memory of the source object.</param>
<param name="ofs">An additional byte offset, which is added to the <paramref name="ptr" /> parameter before reading.</param>
<summary>Reads a processor native sized integer from unmanaged memory.</summary>
<summary>Reads a processor native-sized integer from unmanaged memory.</summary>
<returns>The integer read from unmanaged memory at the given offset.</returns>
<remarks>
<format type="text/markdown"><![CDATA[
Expand Down Expand Up @@ -13285,7 +13285,7 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo)
<Docs>
<param name="ptr">The address in unmanaged memory to write to.</param>
<param name="val">The value to write.</param>
<summary>Writes a processor native sized integer value into unmanaged memory.</summary>
<summary>Writes a processor native-sized integer value into unmanaged memory.</summary>
<remarks>
<format type="text/markdown"><![CDATA[

Expand Down Expand Up @@ -13466,7 +13466,7 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo)
<param name="ptr">The base address in unmanaged memory of the target object.</param>
<param name="ofs">An additional byte offset, which is added to the <paramref name="ptr" /> parameter before writing.</param>
<param name="val">The value to write.</param>
<summary>Writes a processor native sized integer value to unmanaged memory.</summary>
<summary>Writes a processor native-sized integer value to unmanaged memory.</summary>
<remarks>
<format type="text/markdown"><![CDATA[

Expand Down
15 changes: 14 additions & 1 deletion xml/System.Threading/Interlocked.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2950,6 +2950,9 @@ This method wraps a call to [FlushProcessWriteBuffers](/windows/win32/api/proces
## Remarks
The <xref:System.Threading.Interlocked.Read%2A> method is unnecessary on 64-bit systems, because 64-bit read operations are already atomic. On 32-bit systems, 64-bit read operations are not atomic unless performed using <xref:System.Threading.Interlocked.Read%2A>.

> [!IMPORTANT]
> On 32-bit platforms, despite taking a readonly reference parameter, this method requires write access to the memory location because it uses <xref:System.Threading.Interlocked.CompareExchange%2A> internally to ensure atomicity. Attempting to read from read-only memory (such as memory-mapped files opened with read-only access) can result in an <xref:System.AccessViolationException>.

]]></format>
</remarks>
<altmember cref="Overload:System.Threading.Interlocked.Increment" />
Expand Down Expand Up @@ -3006,7 +3009,17 @@ This method wraps a call to [FlushProcessWriteBuffers](/windows/win32/api/proces
<param name="location">The 64-bit value to be loaded.</param>
<summary>Returns a 64-bit unsigned value, loaded as an atomic operation.</summary>
<returns>The loaded value.</returns>
<remarks>To be added.</remarks>
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
The <xref:System.Threading.Interlocked.Read%2A> method is unnecessary on 64-bit systems, because 64-bit read operations are already atomic. On 32-bit systems, 64-bit read operations are not atomic unless performed using <xref:System.Threading.Interlocked.Read%2A>.

> [!IMPORTANT]
> On 32-bit platforms, despite taking a readonly reference parameter, this method requires write access to the memory location because it uses <xref:System.Threading.Interlocked.CompareExchange%2A> internally to ensure atomicity. Attempting to read from read-only memory (such as memory-mapped files opened with read-only access) can result in an <xref:System.AccessViolationException>.

]]></format>
</remarks>
</Docs>
</Member>
<Member MemberName="SpeculationBarrier">
Expand Down
2 changes: 1 addition & 1 deletion xml/System/Math.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7819,7 +7819,7 @@ The following example demonstrates how to use the <xref:System.Math.Round%28Syst
</Parameters>
<Docs>
<param name="value">A signed number.</param>
<summary>Returns an integer that indicates the sign of a native sized signed integer.</summary>
<summary>Returns an integer that indicates the sign of a native-sized signed integer.</summary>
<returns>A number that indicates the sign of <paramref name="value" />, as shown in the following table.

<list type="table"><listheader><term> Return value
Expand Down