read 64-bit value as an atomic operation
Published: 24. October 2011 | Updated: 26. October 2011License: Microsoft Public License (MS-PL)
Categories: Framework » Threading
Tags: C# Threading
Import namespace
using System.Threading;
Code
long i = 100; long value = Interlocked.Read(ref i); Console.WriteLine(value);Console Output:
100
| Send us feedback about this snippet » |





