C Sharp Programming/Keywords/volatile

The keyword is used to declare a variable that may change its value over time due to modification by an outside process, the system hardware, or another concurrently running thread.

You should use this modifier in your member variable declaration to ensure that whenever the value is read, you are always getting the most recent (up-to-date) value of the variable.

This keyword has been part of the C# programming language since .NET Framework 1.1 (Visual Studio 2003).

/Keywords