Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

Compiler Warning (level 1) CS3026 

Error Message

CLS-compliant field 'field' cannot be volatile

A volatile variable should not be CLS compliant.


The following example generates CS3026.

// CS3026.cs
public class Test
public volatile int v0 =0;   // CS3026
      // To resolve remove the CLS-CComplient attribute.
public static void Main() { }

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.