Using volatile Modifier

The volatile keyword indicates that a field might be modified by multiple concurrently executing threads. Marking a field as volatile would make sure that it is not cached dur¬ing the exe¬cu¬tion of a thread.

public volatile int i;

Comments

Popular posts from this blog

C# code to Check IE Proxy Settings

Convert XElement to DataTable