Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
'attribute': anonymous usage not allowed
An attribute was not scoped correctly. For more information, see User-Defined Attributes.
Example
The following sample generates 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{};