Freigeben über


Compilerwarnung (Stufe 1) CS3026

Aktualisiert: November 2007

Fehlermeldung

Das CLS-kompatible Feld 'Feld' kann nicht flüchtig sein
CLS-compliant field 'field' cannot be volatile

Eine flüchtige Variable ist nicht CLS-kompatibel.

Beispiel

Im folgenden Beispiel wird CS3026 generiert.

// 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() { }
}