CustomAttributeExtensions.IsDefined Metodo
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Indica se gli attributi personalizzati vengono applicati a un elemento.
IsDefined(MemberInfo, Type, Boolean) |
Indica se gli attributi personalizzati di un tipo specificato vengono applicati a un membro specificato e, facoltativamente, applicati ai relativi predecessori. |
IsDefined(Assembly, Type) |
Indica se gli attributi personalizzati di un tipo specificato vengono applicati a un assembly specificato. |
IsDefined(MemberInfo, Type) |
Indica se gli attributi personalizzati di un tipo specificato vengono applicati a un membro specificato. |
IsDefined(Module, Type) |
Indica se gli attributi personalizzati di un tipo specificato vengono applicati a un modulo specificato. |
IsDefined(ParameterInfo, Type) |
Indica se gli attributi personalizzati di un tipo specificato vengono applicati a un parametro specificato. |
IsDefined(ParameterInfo, Type, Boolean) |
Indica se gli attributi personalizzati di un tipo specificato vengono applicati a un parametro specificato e, facoltativamente, applicati ai relativi predecessori. |
- Origine:
- CustomAttributeExtensions.cs
- Origine:
- CustomAttributeExtensions.cs
- Origine:
- CustomAttributeExtensions.cs
Indica se gli attributi personalizzati di un tipo specificato vengono applicati a un membro specificato e, facoltativamente, applicati ai relativi predecessori.
public:
[System::Runtime::CompilerServices::Extension]
static bool IsDefined(System::Reflection::MemberInfo ^ element, Type ^ attributeType, bool inherit);
public static bool IsDefined (this System.Reflection.MemberInfo element, Type attributeType, bool inherit);
static member IsDefined : System.Reflection.MemberInfo * Type * bool -> bool
<Extension()>
Public Function IsDefined (element As MemberInfo, attributeType As Type, inherit As Boolean) As Boolean
Parametri
- element
- MemberInfo
Membro da controllare.
- attributeType
- Type
Tipo dell'attributo da cercare.
- inherit
- Boolean
true
controllare i predecessori di element
; in caso contrario, false
.
Restituisce
true
se un attributo del tipo specificato viene applicato a element
; in caso contrario, false
.
Eccezioni
element
o attributeType
è null
.
attributeType
non deriva da Attribute.
element
non è un costruttore, un metodo, una proprietà, un evento, un tipo o un campo.
Si applica a
.NET 9 e altre versioni
Prodotto | Versioni |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1 |
UWP | 10.0 |
- Origine:
- CustomAttributeExtensions.cs
- Origine:
- CustomAttributeExtensions.cs
- Origine:
- CustomAttributeExtensions.cs
Indica se gli attributi personalizzati di un tipo specificato vengono applicati a un assembly specificato.
public:
[System::Runtime::CompilerServices::Extension]
static bool IsDefined(System::Reflection::Assembly ^ element, Type ^ attributeType);
public static bool IsDefined (this System.Reflection.Assembly element, Type attributeType);
static member IsDefined : System.Reflection.Assembly * Type -> bool
<Extension()>
Public Function IsDefined (element As Assembly, attributeType As Type) As Boolean
Parametri
- element
- Assembly
Assembly da controllare.
- attributeType
- Type
Tipo dell'attributo da cercare.
Restituisce
true
se un attributo del tipo specificato viene applicato a element
; in caso contrario, false
.
Eccezioni
element
o attributeType
è null
.
attributeType
non deriva da Attribute.
Si applica a
.NET 9 e altre versioni
Prodotto | Versioni |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1 |
UWP | 10.0 |
- Origine:
- CustomAttributeExtensions.cs
- Origine:
- CustomAttributeExtensions.cs
- Origine:
- CustomAttributeExtensions.cs
Indica se gli attributi personalizzati di un tipo specificato vengono applicati a un membro specificato.
public:
[System::Runtime::CompilerServices::Extension]
static bool IsDefined(System::Reflection::MemberInfo ^ element, Type ^ attributeType);
public static bool IsDefined (this System.Reflection.MemberInfo element, Type attributeType);
static member IsDefined : System.Reflection.MemberInfo * Type -> bool
<Extension()>
Public Function IsDefined (element As MemberInfo, attributeType As Type) As Boolean
Parametri
- element
- MemberInfo
Membro da controllare.
- attributeType
- Type
Tipo di attributo da cercare.
Restituisce
true
se un attributo del tipo specificato viene applicato a element
; in caso contrario, false
.
Eccezioni
element
o attributeType
è null
.
attributeType
non deriva da Attribute.
element
non è un costruttore, un metodo, una proprietà, un evento, un tipo o un campo.
Si applica a
.NET 9 e altre versioni
Prodotto | Versioni |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1 |
UWP | 10.0 |
- Origine:
- CustomAttributeExtensions.cs
- Origine:
- CustomAttributeExtensions.cs
- Origine:
- CustomAttributeExtensions.cs
Indica se gli attributi personalizzati di un tipo specificato vengono applicati a un modulo specificato.
public:
[System::Runtime::CompilerServices::Extension]
static bool IsDefined(System::Reflection::Module ^ element, Type ^ attributeType);
public static bool IsDefined (this System.Reflection.Module element, Type attributeType);
static member IsDefined : System.Reflection.Module * Type -> bool
<Extension()>
Public Function IsDefined (element As Module, attributeType As Type) As Boolean
Parametri
- element
- Module
Modulo da esaminare.
- attributeType
- Type
Tipo di attributo da cercare.
Restituisce
true
se un attributo del tipo specificato viene applicato a element
; in caso contrario, false
.
Eccezioni
element
o attributeType
è null
.
attributeType
non deriva da Attribute.
Si applica a
.NET 9 e altre versioni
Prodotto | Versioni |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1 |
UWP | 10.0 |
- Origine:
- CustomAttributeExtensions.cs
- Origine:
- CustomAttributeExtensions.cs
- Origine:
- CustomAttributeExtensions.cs
Indica se gli attributi personalizzati di un tipo specificato vengono applicati a un parametro specificato.
public:
[System::Runtime::CompilerServices::Extension]
static bool IsDefined(System::Reflection::ParameterInfo ^ element, Type ^ attributeType);
public static bool IsDefined (this System.Reflection.ParameterInfo element, Type attributeType);
static member IsDefined : System.Reflection.ParameterInfo * Type -> bool
<Extension()>
Public Function IsDefined (element As ParameterInfo, attributeType As Type) As Boolean
Parametri
- element
- ParameterInfo
Parametro da esaminare.
- attributeType
- Type
Tipo di attributo da cercare.
Restituisce
true
se un attributo del tipo specificato viene applicato a element
; in caso contrario, false
.
Eccezioni
element
o attributeType
è null
.
attributeType
non deriva da Attribute.
Si applica a
.NET 9 e altre versioni
Prodotto | Versioni |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1 |
UWP | 10.0 |
- Origine:
- CustomAttributeExtensions.cs
- Origine:
- CustomAttributeExtensions.cs
- Origine:
- CustomAttributeExtensions.cs
Indica se gli attributi personalizzati di un tipo specificato vengono applicati a un parametro specificato e, facoltativamente, applicati ai relativi predecessori.
public:
[System::Runtime::CompilerServices::Extension]
static bool IsDefined(System::Reflection::ParameterInfo ^ element, Type ^ attributeType, bool inherit);
public static bool IsDefined (this System.Reflection.ParameterInfo element, Type attributeType, bool inherit);
static member IsDefined : System.Reflection.ParameterInfo * Type * bool -> bool
<Extension()>
Public Function IsDefined (element As ParameterInfo, attributeType As Type, inherit As Boolean) As Boolean
Parametri
- element
- ParameterInfo
Parametro da esaminare.
- attributeType
- Type
Tipo di attributo da cercare.
- inherit
- Boolean
true
controllare i predecessori di element
; in caso contrario, false
.
Restituisce
true
se un attributo del tipo specificato viene applicato a element
; in caso contrario, false
.
Eccezioni
element
o attributeType
è null
.
attributeType
non deriva da Attribute.
Si applica a
.NET 9 e altre versioni
Prodotto | Versioni |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1 |
UWP | 10.0 |
Feedback su .NET
.NET è un progetto di open source. Selezionare un collegamento per fornire feedback: