Kompilatorfel C3749

"attribut": ett anpassat attribut kanske inte används i en funktion

Anmärkningar

Det går inte att använda ett anpassat attribut i en funktion. Mer information om anpassade attribut finns i ämnesattributet.

Example

I följande exempel genereras C3749:

// C3749a.cpp
// compile with: /clr /c
using namespace System;

[AttributeUsage(AttributeTargets::All)]
public ref struct ABC : public Attribute {
   ABC() {}
};

void f1() { [ABC]; };  // C3749