Skip to content

Commit c263ca8

Browse files
Merge pull request #11662 from dotnet/main
Merge main into live
2 parents 4077c7e + b314392 commit c263ca8

File tree

9 files changed

+40
-16
lines changed

9 files changed

+40
-16
lines changed

.github/policies/label-issues.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ configuration:
4646
label: 'area-Extensions-Options'
4747
- labelAdded:
4848
label: 'area-Extensions-Primitives'
49+
- labelAdded:
50+
label: 'area-Infrastructure'
4951
- labelAdded:
5052
label: 'area-System.Buffers'
5153
- labelAdded:
@@ -120,6 +122,8 @@ configuration:
120122
label: 'area-System.Resources'
121123
- labelAdded:
122124
label: 'area-System.Runtime'
125+
- labelAdded:
126+
label: 'area-System.Runtime.InteropServices'
123127
- labelAdded:
124128
label: 'area-System.Security'
125129
- labelAdded:

snippets/csharp/System/String/IndexOfAny/IndexOfAny1.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,15 @@ public static void Run()
88
char[] chars = { 'a', 'e', 'i', 'o', 'u', 'y',
99
'A', 'E', 'I', 'O', 'U', 'Y' };
1010
String s = "The long and winding road...";
11-
Console.WriteLine($"The first vowel in \n {s}\n" +
12-
$"is found at index {s.IndexOfAny(chars)}");
11+
Console.WriteLine($"""
12+
The first vowel in
13+
'{s}'
14+
is found at index {s.IndexOfAny(chars)}
15+
""");
1316

1417
// The example displays the following output:
1518
// The first vowel in
16-
// The long and winding road...
19+
// 'The long and winding road...'
1720
// is found at index 2
1821
// </Snippet1>
1922
}

snippets/csharp/System/String/IndexOfAny/ixany2.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ public static void Run()
2222
Console.WriteLine();
2323
Console.WriteLine("The first character occurrence " +
2424
$"from position {start} to {str.Length - 1}:");
25-
Console.WriteLine($"{Environment.NewLine}{br1}{Environment.NewLine}" +
26-
$"{br2}{Environment.NewLine}{str}{Environment.NewLine}");
25+
Console.WriteLine($"""
26+
{Environment.NewLine}{br1}{Environment.NewLine}
27+
{br2}{Environment.NewLine}{str}{Environment.NewLine}
28+
""");
2729
Console.Write($"A character in '{target}' occurs at position: ");
2830

2931
at = str.IndexOfAny(anyOf, start);

snippets/csharp/System/String/IndexOfAny/ixany3.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ public static void Run()
2121
Console.WriteLine();
2222
Console.WriteLine("The first character occurrence from " +
2323
$"position {start} for {count} characters:");
24-
Console.WriteLine($"{Environment.NewLine}{br1}{Environment.NewLine}{br2}" +
25-
$"{Environment.NewLine}{str}{Environment.NewLine}");
24+
Console.WriteLine($"""
25+
{Environment.NewLine}{br1}{Environment.NewLine}{br2}
26+
{Environment.NewLine}{str}{Environment.NewLine}
27+
""");
2628
Console.Write($"A character in '{target}' occurs at position: ");
2729

2830
int at = str.IndexOfAny(anyOf, start, count);

xml/System.Runtime.InteropServices/CLong.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
</Parameters>
9595
<Docs>
9696
<param name="value">The integer value.</param>
97-
<summary>Constructs an instance from a native sized integer.</summary>
97+
<summary>Constructs an instance from a native-sized integer.</summary>
9898
<remarks>To be added.</remarks>
9999
<exception cref="T:System.OverflowException">
100100
<paramref name="value" /> is outside the range of the underlying storage type.</exception>

xml/System.Runtime.InteropServices/CULong.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
</Parameters>
9595
<Docs>
9696
<param name="value">The integer value.</param>
97-
<summary>Constructs an instance from a native sized unsigned integer.</summary>
97+
<summary>Constructs an instance from a native-sized unsigned integer.</summary>
9898
<remarks>To be added.</remarks>
9999
<exception cref="T:System.OverflowException">
100100
<paramref name="value" /> is outside the range of the underlying storage type.</exception>

xml/System.Runtime.InteropServices/Marshal.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9245,7 +9245,7 @@ On .NET 6 and later versions, this method is functionally equivalent to <xref:Sy
92459245
<AssemblyVersion>4.2.0.0</AssemblyVersion>
92469246
</AssemblyInfo>
92479247
<Docs>
9248-
<summary>Reads a processor native sized integer from unmanaged memory. Reading from unaligned memory locations is supported.</summary>
9248+
<summary>Reads a processor native-sized integer from unmanaged memory. Reading from unaligned memory locations is supported.</summary>
92499249
</Docs>
92509250
</MemberGroup>
92519251
<Member MemberName="ReadIntPtr">
@@ -9393,7 +9393,7 @@ On .NET 6 and later versions, this method is functionally equivalent to <xref:Sy
93939393
<Docs>
93949394
<param name="ptr">The base address in unmanaged memory from which to read.</param>
93959395
<param name="ofs">An additional byte offset, which is added to the <paramref name="ptr" /> parameter before reading.</param>
9396-
<summary>Reads a processor native sized integer at a given offset from unmanaged memory.</summary>
9396+
<summary>Reads a processor native-sized integer at a given offset from unmanaged memory.</summary>
93979397
<returns>The integer read from unmanaged memory at the given offset.</returns>
93989398
<remarks>
93999399
<format type="text/markdown"><![CDATA[
@@ -9488,7 +9488,7 @@ On .NET 6 and later versions, this method is functionally equivalent to <xref:Sy
94889488
<Docs>
94899489
<param name="ptr">The base address in unmanaged memory of the source object.</param>
94909490
<param name="ofs">An additional byte offset, which is added to the <paramref name="ptr" /> parameter before reading.</param>
9491-
<summary>Reads a processor native sized integer from unmanaged memory.</summary>
9491+
<summary>Reads a processor native-sized integer from unmanaged memory.</summary>
94929492
<returns>The integer read from unmanaged memory at the given offset.</returns>
94939493
<remarks>
94949494
<format type="text/markdown"><![CDATA[
@@ -13285,7 +13285,7 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo)
1328513285
<Docs>
1328613286
<param name="ptr">The address in unmanaged memory to write to.</param>
1328713287
<param name="val">The value to write.</param>
13288-
<summary>Writes a processor native sized integer value into unmanaged memory.</summary>
13288+
<summary>Writes a processor native-sized integer value into unmanaged memory.</summary>
1328913289
<remarks>
1329013290
<format type="text/markdown"><![CDATA[
1329113291

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

xml/System.Threading/Interlocked.xml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2950,6 +2950,9 @@ This method wraps a call to [FlushProcessWriteBuffers](/windows/win32/api/proces
29502950
## Remarks
29512951
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>.
29522952
2953+
> [!IMPORTANT]
2954+
> 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>.
2955+
29532956
]]></format>
29542957
</remarks>
29552958
<altmember cref="Overload:System.Threading.Interlocked.Increment" />
@@ -3006,7 +3009,17 @@ This method wraps a call to [FlushProcessWriteBuffers](/windows/win32/api/proces
30063009
<param name="location">The 64-bit value to be loaded.</param>
30073010
<summary>Returns a 64-bit unsigned value, loaded as an atomic operation.</summary>
30083011
<returns>The loaded value.</returns>
3009-
<remarks>To be added.</remarks>
3012+
<remarks>
3013+
<format type="text/markdown"><![CDATA[
3014+
3015+
## Remarks
3016+
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>.
3017+
3018+
> [!IMPORTANT]
3019+
> 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>.
3020+
3021+
]]></format>
3022+
</remarks>
30103023
</Docs>
30113024
</Member>
30123025
<Member MemberName="SpeculationBarrier">

xml/System/Math.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7819,7 +7819,7 @@ The following example demonstrates how to use the <xref:System.Math.Round%28Syst
78197819
</Parameters>
78207820
<Docs>
78217821
<param name="value">A signed number.</param>
7822-
<summary>Returns an integer that indicates the sign of a native sized signed integer.</summary>
7822+
<summary>Returns an integer that indicates the sign of a native-sized signed integer.</summary>
78237823
<returns>A number that indicates the sign of <paramref name="value" />, as shown in the following table.
78247824

78257825
<list type="table"><listheader><term> Return value

0 commit comments

Comments
 (0)