You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<typeparamname="T">The type to be used for <paramrefname="location1" />, <paramrefname="value" />, and <paramrefname="comparand" />. This type must be a reference type.</typeparam>
1344
+
<typeparamname="T">The type to be used for <paramrefname="location1" />, <paramrefname="value" />, and <paramrefname="comparand" />.</typeparam>
1345
1345
<paramname="location1">The destination, whose value is compared by reference with <paramrefname="comparand" /> and possibly replaced. This is a reference parameter (<seelangword="ref" /> in C#, <seelangword="ByRef" /> in Visual Basic).</param>
1346
1346
<paramname="value">The value that replaces the destination value if the comparison by reference results in equality.</param>
1347
1347
<paramname="comparand">The value that is compared by reference to the value at <paramrefname="location1" />.</param>
1348
-
<summary>Compares two instances of the specified reference type <paramrefname="T" /> for reference equality and, if they are equal, replaces the first one, as an atomic operation.</summary>
1348
+
<summary>Compares two instances of the specified type <typeparamrefname="T" /> for reference equality and, if they're equal, replaces the first one, as an atomic operation.</summary>
1349
1349
<returns>The original value in <paramrefname="location1" />.</returns>
1350
1350
<remarks>
1351
1351
<formattype="text/markdown"><![CDATA[
1352
1352
1353
1353
## Remarks
1354
-
If `comparand` and the value in `location1` are equal by reference, then `value` is stored in `location1`. Otherwise, no operation is performed. The comparison and the exchange are performed as an atomic operation. The return value of this method is the original value in `location1`, whether or not the exchange takes place.
1355
1354
1356
-
This method only supports reference types. There are overloads of the <xref:System.Threading.Interlocked.CompareExchange%2A> method for the value types <xref:System.Int32>, <xref:System.Int64>, <xref:System.IntPtr>, <xref:System.Single>, and <xref:System.Double>, but there is no support for other value types.
1355
+
If `comparand` and the value in `location1` are equal by reference, then `value` is stored in `location1`. Otherwise, no operation is performed. The comparison and the exchange are performed as an atomic operation. The return value of this method is the original value in `location1`, whether or not the exchange takes place.
1357
1356
1358
1357
> [!NOTE]
1359
-
> This method overload is preferable to the <xref:System.Threading.Interlocked.CompareExchange%28System.Object%40%2CSystem.Object%2CSystem.Object%29> method overload, because the latter requires the destination object to be accessed late-bound.
1358
+
> This method overload is preferable to the <xref:System.Threading.Interlocked.CompareExchange%28System.Object%40%2CSystem.Object%2CSystem.Object%29> method overload, because the latter requires the destination object to be accessed late-bound.
1360
1359
1361
1360
]]></format>
1362
1361
</remarks>
@@ -2371,19 +2370,14 @@ If `comparand` and the object in `location1` are equal by reference, then `value
<typeparamname="T">The type to be used for <paramrefname="location1" /> and <paramrefname="value" />. This type must be a reference type.</typeparam>
2373
+
<typeparamname="T">The type to be used for <paramrefname="location1" /> and <paramrefname="value" />.</typeparam>
2375
2374
<paramname="location1">The variable to set to the specified value. This is a reference parameter (<seelangword="ref" /> in C#, <seelangword="ByRef" /> in Visual Basic).</param>
2376
2375
<paramname="value">The value to which the <paramrefname="location1" /> parameter is set.</param>
2377
2376
<summary>Sets a variable of the specified type <paramrefname="T" /> to a specified value and returns the original value, as an atomic operation.</summary>
2378
2377
<returns>The original value of <paramrefname="location1" />.</returns>
2379
2378
<remarks>
2380
2379
<formattype="text/markdown"><![CDATA[
2381
-
2382
-
## Remarks
2383
-
This method only supports reference types. There are overloads of the <xref:System.Threading.Interlocked.Exchange%2A> method for the <xref:System.Int32>, <xref:System.Int64>, <xref:System.IntPtr>, <xref:System.Single>, and <xref:System.Double> value types, but there is no support for other value types.
2384
-
2385
-
> [!NOTE]
2386
-
> This method overload is preferable to the <xref:System.Threading.Interlocked.Exchange%28System.Object%40%2CSystem.Object%29> method overload, because the latter requires late-bound access to the destination object .
2380
+
This method overload is preferable to the <xref:System.Threading.Interlocked.Exchange%28System.Object%40%2CSystem.Object%29> method overload, because the latter requires late-bound access to the destination object.
2387
2381
]]></format>
2388
2382
</remarks>
2389
2383
<exceptioncref="T:System.NullReferenceException">The address of <paramrefname="location1" /> is a <seelangword="null" /> pointer.</exception>
0 commit comments