Nota
O acesso a esta página requer autorização. Podes tentar iniciar sessão ou mudar de diretório.
O acesso a esta página requer autorização. Podes tentar mudar de diretório.
'atributo': atributo deve ter escopo com 'assembly:' ou 'module:'
Observações
Um atributo global foi usado incorretamente.
Para obter mais informações, consulte atributos definidos pelo utilizador.
Example
O exemplo a seguir gera C3097.
// C3097.cpp
// compile with: /clr /c
using namespace System;
[AttributeUsage(AttributeTargets::All, AllowMultiple = true)]
public ref class Attr : public Attribute {
public:
Attr(int t) : m_t(t) {}
int m_t;
};
[Attr(10)]; // C3097
[assembly:Attr(10)]; // OK
[Attr(10)] // OK
public ref class MyClass {};