Show/Hide Toolbars

XSharp

'identifier': a reference to a volatile field will not be treated as volatile

 

A volatile field should not normally be passed using a ref or out parameter, since it will not be treated as volatile within the scope of the function. There are exceptions to this, such as when calling an interlocked API. As with any warning, you may use the #pragma warning to disable this warning in those rare cases where you are intentionally using a volatile field as a reference parameter.

 

The following sample generates XS0420:

 

 

// XS0420.prg  
// compile with: /W:1