Advertencia del compilador (nivel 1) CS3026

Actualización: noviembre 2007

Mensaje de error

El campo compatible con CLS 'campo' no puede ser volátil
CLS-compliant field 'field' cannot be volatile

Una variable volátil no debe ser compatible con CLS.

Ejemplo

En el siguiente ejemplo se genera el error CS3026.

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