Freigeben über


Compilerwarnung (Stufe 1) CS3026

Das CLS-kompatible Feld "Feld" kann nicht flüchtig sein

Eine flüchtige Variable darf nicht CLS-kompatibel sein.

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-Compliant attribute.
    public static void Main() { }
}