Skip to content

Commit 250e81e

Browse files
MSDN-WhiteKnightBillWagner
authored andcommitted
Improve Volatile class documentation (#2503)
* Update Volatile.xml * Update Volatile.xml
1 parent db59419 commit 250e81e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

xml/System.Threading/Volatile.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,11 @@
4646
> [!NOTE]
4747
> Calling one of these methods affects only a single memory access. To provide effective synchronization for a field, all access to the field must use <xref:System.Threading.Volatile.Read%2A?displayProperty=nameWithType> and <xref:System.Threading.Volatile.Write%2A?displayProperty=nameWithType>.
4848
49-
- In C#, using the `volatile` modifier on a field guarantees that every access to that field uses the <xref:System.Threading.Volatile.Read%2A?displayProperty=nameWithType> and <xref:System.Threading.Volatile.Write%2A?displayProperty=nameWithType> methods, but the `volatile` modifier cannot be applied to array elements. The <xref:System.Threading.Volatile.Read%2A?displayProperty=nameWithType> and <xref:System.Threading.Volatile.Write%2A?displayProperty=nameWithType> methods can be used on array elements.
49+
- In C#, using the `volatile` modifier on a field guarantees that every access to that field is a volatile memory operation, but the `volatile` modifier cannot be applied to array elements. The <xref:System.Threading.Volatile.Read%2A?displayProperty=nameWithType> and <xref:System.Threading.Volatile.Write%2A?displayProperty=nameWithType> methods can be used on array elements.
5050
5151
]]></format>
5252
</remarks>
53+
<related type="Article" href="/dotnet/csharp/language-reference/keywords/volatile">volatile keyword (C# Reference)</related>
5354
</Docs>
5455
<Members>
5556
<MemberGroup MemberName="Read">

0 commit comments

Comments
 (0)