Examveda

What is the purpose of the 'volatile' keyword in C#?

A. To define a constant

B. To make a variable accessible outside its class

C. To make a variable read-only

D. To indicate that a variable's value can be modified by multiple threads concurrently

Answer: Option D


Join The Discussion

Related Questions on Variables and Constants in C Sharp