Kompilatorfel C3094

"attribut": anonym användning tillåts inte

Anmärkningar

Ett attribut avgränsades inte korrekt. Mer information finns iUser-Defined Attribut.

Example

I följande exempel genereras C3094.

// C3094.cpp
// compile with: /clr /c
using namespace System;
[AttributeUsage(AttributeTargets::Class)]
public ref class AAttribute : Attribute {};

[A];   // C3094

// OK
[A]
ref class x{};