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

Convert XElement to DataTable

Enable mouse scroll-wheel in VB6

C# code to Check IE Proxy Settings