Represents the base class for custom attributes.
More...
Inherits System.Runtime.InteropServices._Attribute.
Inherited by System.AttributeUsageAttribute, System.CLSCompliantAttribute, System.CodeDom.Compiler.GeneratedCodeAttribute, System.ComponentModel.AmbientValueAttribute, System.ComponentModel.AttributeProviderAttribute, System.ComponentModel.BindableAttribute, System.ComponentModel.BrowsableAttribute, System.ComponentModel.CategoryAttribute, System.ComponentModel.ComplexBindingPropertiesAttribute, System.ComponentModel.DataObjectAttribute, System.ComponentModel.DataObjectFieldAttribute, System.ComponentModel.DataObjectMethodAttribute, System.ComponentModel.DefaultBindingPropertyAttribute, System.ComponentModel.DefaultEventAttribute, System.ComponentModel.DefaultPropertyAttribute, System.ComponentModel.DefaultValueAttribute, System.ComponentModel.DescriptionAttribute, System.ComponentModel.Design.HelpKeywordAttribute, System.ComponentModel.Design.Serialization.DefaultSerializationProviderAttribute, System.ComponentModel.Design.Serialization.DesignerSerializerAttribute, System.ComponentModel.Design.Serialization.RootDesignerSerializerAttribute, System.ComponentModel.DesignerAttribute, System.ComponentModel.DesignerCategoryAttribute, System.ComponentModel.DesignerSerializationVisibilityAttribute, System.ComponentModel.DesignOnlyAttribute, System.ComponentModel.DesignTimeVisibleAttribute, System.ComponentModel.DisplayNameAttribute, System.ComponentModel.EditorAttribute, System.ComponentModel.EditorBrowsableAttribute, System.ComponentModel.ExtenderProvidedPropertyAttribute, System.ComponentModel.ImmutableObjectAttribute, System.ComponentModel.InheritanceAttribute, System.ComponentModel.InitializationEventAttribute, System.ComponentModel.InstallerTypeAttribute, System.ComponentModel.LicenseProviderAttribute, System.ComponentModel.ListBindableAttribute, System.ComponentModel.LocalizableAttribute, System.ComponentModel.LookupBindingPropertiesAttribute, System.ComponentModel.MergablePropertyAttribute, System.ComponentModel.NotifyParentPropertyAttribute, System.ComponentModel.ParenthesizePropertyNameAttribute, System.ComponentModel.PasswordPropertyTextAttribute, System.ComponentModel.PropertyTabAttribute, System.ComponentModel.ProvidePropertyAttribute, System.ComponentModel.ReadOnlyAttribute, System.ComponentModel.RecommendedAsConfigurableAttribute, System.ComponentModel.RefreshPropertiesAttribute, System.ComponentModel.RunInstallerAttribute, System.ComponentModel.SettingsBindableAttribute, System.ComponentModel.ToolboxItemAttribute, System.ComponentModel.ToolboxItemFilterAttribute, System.ComponentModel.TypeConverterAttribute, System.ComponentModel.TypeDescriptionProviderAttribute, System.Configuration.DefaultSettingValueAttribute, System.Configuration.NoSettingsVersionUpgradeAttribute, System.Configuration.SettingAttribute, System.Configuration.SettingsDescriptionAttribute, System.Configuration.SettingsGroupDescriptionAttribute, System.Configuration.SettingsGroupNameAttribute, System.Configuration.SettingsManageabilityAttribute, System.Configuration.SettingsProviderAttribute, System.Configuration.SettingsSerializeAsAttribute, System.Configuration.SpecialSettingAttribute, System.ContextStaticAttribute, System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute, System.Diagnostics.CodeAnalysis.SuppressMessageAttribute, System.Diagnostics.ConditionalAttribute, System.Diagnostics.Contracts.ContractAbbreviatorAttribute, System.Diagnostics.Contracts.ContractArgumentValidatorAttribute, System.Diagnostics.Contracts.ContractClassAttribute, System.Diagnostics.Contracts.ContractClassForAttribute, System.Diagnostics.Contracts.ContractInvariantMethodAttribute, System.Diagnostics.Contracts.ContractOptionAttribute, System.Diagnostics.Contracts.ContractPublicPropertyNameAttribute, System.Diagnostics.Contracts.ContractReferenceAssemblyAttribute, System.Diagnostics.Contracts.ContractRuntimeIgnoredAttribute, System.Diagnostics.Contracts.ContractVerificationAttribute, System.Diagnostics.Contracts.PureAttribute, System.Diagnostics.DebuggableAttribute, System.Diagnostics.DebuggerBrowsableAttribute, System.Diagnostics.DebuggerDisplayAttribute, System.Diagnostics.DebuggerHiddenAttribute, System.Diagnostics.DebuggerNonUserCodeAttribute, System.Diagnostics.DebuggerStepperBoundaryAttribute, System.Diagnostics.DebuggerStepThroughAttribute, System.Diagnostics.DebuggerTypeProxyAttribute, System.Diagnostics.DebuggerVisualizerAttribute, System.Diagnostics.SwitchAttribute, System.Diagnostics.SwitchLevelAttribute, System.Diagnostics.Tracing.EventAttribute, System.Diagnostics.Tracing.EventChannelAttribute, System.Diagnostics.Tracing.EventDataAttribute, System.Diagnostics.Tracing.EventFieldAttribute, System.Diagnostics.Tracing.EventIgnoreAttribute, System.Diagnostics.Tracing.EventSourceAttribute, System.Diagnostics.Tracing.NonEventAttribute, System.Drawing.BitmapSuffixInSatelliteAssemblyAttribute, System.FlagsAttribute, System.LoaderOptimizationAttribute, System.Management.Instrumentation.ManagementEntityAttribute, System.Management.Instrumentation.ManagementMemberAttribute, System.Management.Instrumentation.ManagementNameAttribute, System.Management.Instrumentation.ManagementReferenceAttribute, System.Management.Instrumentation.WmiConfigurationAttribute, System.MTAThreadAttribute, System.NonSerializedAttribute, System.ObsoleteAttribute, System.ParamArrayAttribute, System.Reflection.AssemblyAlgorithmIdAttribute, System.Reflection.AssemblyCompanyAttribute, System.Reflection.AssemblyConfigurationAttribute, System.Reflection.AssemblyCopyrightAttribute, System.Reflection.AssemblyCultureAttribute, System.Reflection.AssemblyDefaultAliasAttribute, System.Reflection.AssemblyDelaySignAttribute, System.Reflection.AssemblyDescriptionAttribute, System.Reflection.AssemblyFileVersionAttribute, System.Reflection.AssemblyFlagsAttribute, System.Reflection.AssemblyInformationalVersionAttribute, System.Reflection.AssemblyKeyFileAttribute, System.Reflection.AssemblyKeyNameAttribute, System.Reflection.AssemblyMetadataAttribute, System.Reflection.AssemblyProductAttribute, System.Reflection.AssemblySignatureKeyAttribute, System.Reflection.AssemblyTitleAttribute, System.Reflection.AssemblyTrademarkAttribute, System.Reflection.AssemblyVersionAttribute, System.Reflection.DefaultMemberAttribute, System.Reflection.ObfuscateAssemblyAttribute, System.Reflection.ObfuscationAttribute, System.Resources.NeutralResourcesLanguageAttribute, System.Resources.SatelliteContractVersionAttribute, System.Runtime.AssemblyTargetedPatchBandAttribute, System.Runtime.CompilerServices.AccessedThroughPropertyAttribute, System.Runtime.CompilerServices.CallerFilePathAttribute, System.Runtime.CompilerServices.CallerLineNumberAttribute, System.Runtime.CompilerServices.CallerMemberNameAttribute, System.Runtime.CompilerServices.CompilationRelaxationsAttribute, System.Runtime.CompilerServices.CompilerGeneratedAttribute, System.Runtime.CompilerServices.CompilerGlobalScopeAttribute, System.Runtime.CompilerServices.CustomConstantAttribute, System.Runtime.CompilerServices.DecimalConstantAttribute, System.Runtime.CompilerServices.DecoratedNameAttribute, System.Runtime.CompilerServices.DefaultDependencyAttribute, System.Runtime.CompilerServices.DependencyAttribute, System.Runtime.CompilerServices.DisablePrivateReflectionAttribute, System.Runtime.CompilerServices.DiscardableAttribute, System.Runtime.CompilerServices.DynamicAttribute, System.Runtime.CompilerServices.ExtensionAttribute, System.Runtime.CompilerServices.FixedAddressValueTypeAttribute, System.Runtime.CompilerServices.FixedBufferAttribute, System.Runtime.CompilerServices.FriendAccessAllowedAttribute, System.Runtime.CompilerServices.HasCopySemanticsAttribute, System.Runtime.CompilerServices.IndexerNameAttribute, System.Runtime.CompilerServices.InternalsVisibleToAttribute, System.Runtime.CompilerServices.IsByRefLikeAttribute, System.Runtime.CompilerServices.IsReadOnlyAttribute, System.Runtime.CompilerServices.MethodImplAttribute, System.Runtime.CompilerServices.NativeCppClassAttribute, System.Runtime.CompilerServices.ReferenceAssemblyAttribute, System.Runtime.CompilerServices.RequiredAttributeAttribute, System.Runtime.CompilerServices.RuntimeCompatibilityAttribute, System.Runtime.CompilerServices.ScopelessEnumAttribute, System.Runtime.CompilerServices.SpecialNameAttribute, System.Runtime.CompilerServices.StateMachineAttribute, System.Runtime.CompilerServices.StringFreezingAttribute, System.Runtime.CompilerServices.SuppressIldasmAttribute, System.Runtime.CompilerServices.SuppressMergeCheckAttribute, System.Runtime.CompilerServices.TupleElementNamesAttribute, System.Runtime.CompilerServices.TypeDependencyAttribute, System.Runtime.CompilerServices.TypeForwardedFromAttribute, System.Runtime.CompilerServices.TypeForwardedToAttribute, System.Runtime.CompilerServices.UnsafeValueTypeAttribute, System.Runtime.ConstrainedExecution.PrePrepareMethodAttribute, System.Runtime.ConstrainedExecution.ReliabilityContractAttribute, System.Runtime.ExceptionServices.HandleProcessCorruptedStateExceptionsAttribute, System.Runtime.InteropServices.AllowReversePInvokeCallsAttribute, System.Runtime.InteropServices.AutomationProxyAttribute, System.Runtime.InteropServices.BestFitMappingAttribute, System.Runtime.InteropServices.ClassInterfaceAttribute, System.Runtime.InteropServices.CoClassAttribute, System.Runtime.InteropServices.ComAliasNameAttribute, System.Runtime.InteropServices.ComCompatibleVersionAttribute, System.Runtime.InteropServices.ComConversionLossAttribute, System.Runtime.InteropServices.ComDefaultInterfaceAttribute, System.Runtime.InteropServices.ComEventInterfaceAttribute, System.Runtime.InteropServices.ComImportAttribute, System.Runtime.InteropServices.ComRegisterFunctionAttribute, System.Runtime.InteropServices.ComSourceInterfacesAttribute, System.Runtime.InteropServices.ComUnregisterFunctionAttribute, System.Runtime.InteropServices.ComVisibleAttribute, System.Runtime.InteropServices.DefaultCharSetAttribute, System.Runtime.InteropServices.DefaultDllImportSearchPathsAttribute, System.Runtime.InteropServices.DefaultParameterValueAttribute, System.Runtime.InteropServices.DispIdAttribute, System.Runtime.InteropServices.DllImportAttribute, System.Runtime.InteropServices.FieldOffsetAttribute, System.Runtime.InteropServices.GuidAttribute, System.Runtime.InteropServices.IDispatchImplAttribute, System.Runtime.InteropServices.ImportedFromTypeLibAttribute, System.Runtime.InteropServices.InAttribute, System.Runtime.InteropServices.InterfaceTypeAttribute, System.Runtime.InteropServices.LCIDConversionAttribute, System.Runtime.InteropServices.ManagedToNativeComInteropStubAttribute, System.Runtime.InteropServices.MarshalAsAttribute, System.Runtime.InteropServices.OptionalAttribute, System.Runtime.InteropServices.OutAttribute, System.Runtime.InteropServices.PreserveSigAttribute, System.Runtime.InteropServices.PrimaryInteropAssemblyAttribute, System.Runtime.InteropServices.ProgIdAttribute, System.Runtime.InteropServices.SetWin32ContextInIDispatchAttribute, System.Runtime.InteropServices.StructLayoutAttribute, System.Runtime.InteropServices.TypeIdentifierAttribute, System.Runtime.InteropServices.TypeLibFuncAttribute, System.Runtime.InteropServices.TypeLibImportClassAttribute, System.Runtime.InteropServices.TypeLibTypeAttribute, System.Runtime.InteropServices.TypeLibVarAttribute, System.Runtime.InteropServices.TypeLibVersionAttribute, System.Runtime.InteropServices.UnmanagedFunctionPointerAttribute, System.Runtime.InteropServices.WindowsRuntime.DefaultInterfaceAttribute, System.Runtime.InteropServices.WindowsRuntime.InterfaceImplementedInVersionAttribute, System.Runtime.InteropServices.WindowsRuntime.ReadOnlyArrayAttribute, System.Runtime.InteropServices.WindowsRuntime.ReturnValueNameAttribute, System.Runtime.InteropServices.WindowsRuntime.WindowsRuntimeImportAttribute, System.Runtime.InteropServices.WindowsRuntime.WriteOnlyArrayAttribute, System.Runtime.Remoting.Contexts.ContextAttribute, System.Runtime.Remoting.Messaging.OneWayAttribute, System.Runtime.Remoting.Metadata.SoapAttribute, System.Runtime.Remoting.Proxies.ProxyAttribute, System.Runtime.Serialization.OnDeserializedAttribute, System.Runtime.Serialization.OnDeserializingAttribute, System.Runtime.Serialization.OnSerializedAttribute, System.Runtime.Serialization.OnSerializingAttribute, System.Runtime.Serialization.OptionalFieldAttribute, System.Runtime.TargetedPatchingOptOutAttribute, System.Runtime.Versioning.ComponentGuaranteesAttribute, System.Runtime.Versioning.NonVersionableAttribute, System.Runtime.Versioning.ResourceConsumptionAttribute, System.Runtime.Versioning.ResourceExposureAttribute, System.Runtime.Versioning.TargetFrameworkAttribute, System.Security.AllowPartiallyTrustedCallersAttribute, System.Security.DynamicSecurityMethodAttribute, System.Security.Permissions.SecurityAttribute, System.Security.SecurityCriticalAttribute, System.Security.SecurityRulesAttribute, System.Security.SecuritySafeCriticalAttribute, System.Security.SecurityTransparentAttribute, System.Security.SecurityTreatAsSafeAttribute, System.Security.SuppressUnmanagedCodeSecurityAttribute, System.Security.UnverifiableCodeAttribute, System.SerializableAttribute, System.STAThreadAttribute, System.ThreadStaticAttribute, System.Xml.Serialization.SoapAttributeAttribute, System.Xml.Serialization.SoapElementAttribute, System.Xml.Serialization.SoapEnumAttribute, System.Xml.Serialization.SoapIgnoreAttribute, System.Xml.Serialization.SoapIncludeAttribute, System.Xml.Serialization.SoapTypeAttribute, System.Xml.Serialization.XmlAnyAttributeAttribute, System.Xml.Serialization.XmlAnyElementAttribute, System.Xml.Serialization.XmlArrayAttribute, System.Xml.Serialization.XmlArrayItemAttribute, System.Xml.Serialization.XmlAttributeAttribute, System.Xml.Serialization.XmlChoiceIdentifierAttribute, System.Xml.Serialization.XmlElementAttribute, System.Xml.Serialization.XmlEnumAttribute, System.Xml.Serialization.XmlIgnoreAttribute, System.Xml.Serialization.XmlIncludeAttribute, System.Xml.Serialization.XmlNamespaceDeclarationsAttribute, System.Xml.Serialization.XmlRootAttribute, System.Xml.Serialization.XmlSchemaProviderAttribute, System.Xml.Serialization.XmlSerializerAssemblyAttribute, System.Xml.Serialization.XmlSerializerVersionAttribute, System.Xml.Serialization.XmlTextAttribute, System.Xml.Serialization.XmlTypeAttribute, and System.XmlIgnoreMemberAttribute.
|
override bool | Equals (object obj) |
| Returns a value that indicates whether this instance is equal to a specified object. More...
|
|
override int | GetHashCode () |
| Returns the hash code for this instance. More...
|
|
virtual bool | Match (object obj) |
| When overridden in a derived class, returns a value that indicates whether this instance equals a specified object. More...
|
|
virtual bool | IsDefaultAttribute () |
| When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class. More...
|
|
|
static Attribute [] | GetCustomAttributes (MemberInfo element, Type type) |
| Retrieves an array of the custom attributes applied to a member of a type. Parameters specify the member, and the type of the custom attribute to search for. More...
|
|
static Attribute [] | GetCustomAttributes (MemberInfo element, Type type, bool inherit) |
| Retrieves an array of the custom attributes applied to a member of a type. Parameters specify the member, the type of the custom attribute to search for, and whether to search ancestors of the member. More...
|
|
static Attribute [] | GetCustomAttributes (MemberInfo element) |
| Retrieves an array of the custom attributes applied to a member of a type. A parameter specifies the member. More...
|
|
static Attribute [] | GetCustomAttributes (MemberInfo element, bool inherit) |
| Retrieves an array of the custom attributes applied to a member of a type. Parameters specify the member, the type of the custom attribute to search for, and whether to search ancestors of the member. More...
|
|
static bool | IsDefined (MemberInfo element, Type attributeType) |
| Determines whether any custom attributes are applied to a member of a type. Parameters specify the member, and the type of the custom attribute to search for. More...
|
|
static bool | IsDefined (MemberInfo element, Type attributeType, bool inherit) |
| Determines whether any custom attributes are applied to a member of a type. Parameters specify the member, the type of the custom attribute to search for, and whether to search ancestors of the member. More...
|
|
static Attribute | GetCustomAttribute (MemberInfo element, Type attributeType) |
| Retrieves a custom attribute applied to a member of a type. Parameters specify the member, and the type of the custom attribute to search for. More...
|
|
static Attribute | GetCustomAttribute (MemberInfo element, Type attributeType, bool inherit) |
| Retrieves a custom attribute applied to a member of a type. Parameters specify the member, the type of the custom attribute to search for, and whether to search ancestors of the member. More...
|
|
static Attribute [] | GetCustomAttributes (ParameterInfo element) |
| Retrieves an array of the custom attributes applied to a method parameter. A parameter specifies the method parameter. More...
|
|
static Attribute [] | GetCustomAttributes (ParameterInfo element, Type attributeType) |
| Retrieves an array of the custom attributes applied to a method parameter. Parameters specify the method parameter, and the type of the custom attribute to search for. More...
|
|
static Attribute [] | GetCustomAttributes (ParameterInfo element, Type attributeType, bool inherit) |
| Retrieves an array of the custom attributes applied to a method parameter. Parameters specify the method parameter, the type of the custom attribute to search for, and whether to search ancestors of the method parameter. More...
|
|
static Attribute [] | GetCustomAttributes (ParameterInfo element, bool inherit) |
| Retrieves an array of the custom attributes applied to a method parameter. Parameters specify the method parameter, and whether to search ancestors of the method parameter. More...
|
|
static bool | IsDefined (ParameterInfo element, Type attributeType) |
| Determines whether any custom attributes are applied to a method parameter. Parameters specify the method parameter, and the type of the custom attribute to search for. More...
|
|
static bool | IsDefined (ParameterInfo element, Type attributeType, bool inherit) |
| Determines whether any custom attributes are applied to a method parameter. Parameters specify the method parameter, the type of the custom attribute to search for, and whether to search ancestors of the method parameter. More...
|
|
static Attribute | GetCustomAttribute (ParameterInfo element, Type attributeType) |
| Retrieves a custom attribute applied to a method parameter. Parameters specify the method parameter, and the type of the custom attribute to search for. More...
|
|
static Attribute | GetCustomAttribute (ParameterInfo element, Type attributeType, bool inherit) |
| Retrieves a custom attribute applied to a method parameter. Parameters specify the method parameter, the type of the custom attribute to search for, and whether to search ancestors of the method parameter. More...
|
|
static Attribute [] | GetCustomAttributes (Module element, Type attributeType) |
| Retrieves an array of the custom attributes applied to a module. Parameters specify the module, and the type of the custom attribute to search for. More...
|
|
static Attribute [] | GetCustomAttributes (Module element) |
| Retrieves an array of the custom attributes applied to a module. A parameter specifies the module. More...
|
|
static Attribute [] | GetCustomAttributes (Module element, bool inherit) |
| Retrieves an array of the custom attributes applied to a module. Parameters specify the module, and an ignored search option. More...
|
|
static Attribute [] | GetCustomAttributes (Module element, Type attributeType, bool inherit) |
| Retrieves an array of the custom attributes applied to a module. Parameters specify the module, the type of the custom attribute to search for, and an ignored search option. More...
|
|
static bool | IsDefined (Module element, Type attributeType) |
| Determines whether any custom attributes of a specified type are applied to a module. Parameters specify the module, and the type of the custom attribute to search for. More...
|
|
static bool | IsDefined (Module element, Type attributeType, bool inherit) |
| Determines whether any custom attributes are applied to a module. Parameters specify the module, the type of the custom attribute to search for, and an ignored search option. More...
|
|
static Attribute | GetCustomAttribute (Module element, Type attributeType) |
| Retrieves a custom attribute applied to a module. Parameters specify the module, and the type of the custom attribute to search for. More...
|
|
static Attribute | GetCustomAttribute (Module element, Type attributeType, bool inherit) |
| Retrieves a custom attribute applied to a module. Parameters specify the module, the type of the custom attribute to search for, and an ignored search option. More...
|
|
static Attribute [] | GetCustomAttributes (Assembly element, Type attributeType) |
| Retrieves an array of the custom attributes applied to an assembly. Parameters specify the assembly, and the type of the custom attribute to search for. More...
|
|
static Attribute [] | GetCustomAttributes (Assembly element, Type attributeType, bool inherit) |
| Retrieves an array of the custom attributes applied to an assembly. Parameters specify the assembly, the type of the custom attribute to search for, and an ignored search option. More...
|
|
static Attribute [] | GetCustomAttributes (Assembly element) |
| Retrieves an array of the custom attributes applied to an assembly. A parameter specifies the assembly. More...
|
|
static Attribute [] | GetCustomAttributes (Assembly element, bool inherit) |
| Retrieves an array of the custom attributes applied to an assembly. Parameters specify the assembly, and an ignored search option. More...
|
|
static bool | IsDefined (Assembly element, Type attributeType) |
| Determines whether any custom attributes are applied to an assembly. Parameters specify the assembly, and the type of the custom attribute to search for. More...
|
|
static bool | IsDefined (Assembly element, Type attributeType, bool inherit) |
| Determines whether any custom attributes are applied to an assembly. Parameters specify the assembly, the type of the custom attribute to search for, and an ignored search option. More...
|
|
static Attribute | GetCustomAttribute (Assembly element, Type attributeType) |
| Retrieves a custom attribute applied to a specified assembly. Parameters specify the assembly and the type of the custom attribute to search for. More...
|
|
static Attribute | GetCustomAttribute (Assembly element, Type attributeType, bool inherit) |
| Retrieves a custom attribute applied to an assembly. Parameters specify the assembly, the type of the custom attribute to search for, and an ignored search option. More...
|
|
|
virtual object | TypeId => GetType() |
| When implemented in a derived class, gets a unique identifier for this T:System.Attribute. More...
|
|
|
| Attribute () |
| Initializes a new instance of the T:System.Attribute class. More...
|
|
Represents the base class for custom attributes.
Definition at line 15 of file Attribute.cs.
◆ Attribute()
System.Attribute.Attribute |
( |
| ) |
|
|
protected |
Initializes a new instance of the T:System.Attribute class.
Definition at line 1016 of file Attribute.cs.
◆ Equals()
override bool System.Attribute.Equals |
( |
object |
obj | ) |
|
Returns a value that indicates whether this instance is equal to a specified object.
- Parameters
-
- Returns
true
if obj equals the type and value of this instance; otherwise, false
.
Definition at line 1026 of file Attribute.cs.
◆ GetCustomAttribute() [1/8]
Retrieves a custom attribute applied to a member of a type. Parameters specify the member, and the type of the custom attribute to search for.
- Parameters
-
element | An object derived from the T:System.Reflection.MemberInfo class that describes a constructor, event, field, method, or property member of a class. |
attributeType | The type, or a base type, of the custom attribute to search for. |
- Returns
- A reference to the single custom attribute of type attributeType that is applied to element , or
null
if there is no such attribute.
- Exceptions
-
T:System.ArgumentNullException | element or attributeType is null . |
T:System.ArgumentException | attributeType is not derived from T:System.Attribute. |
T:System.NotSupportedException | element is not a constructor, method, property, event, type, or field. |
T:System.Reflection.AmbiguousMatchException | More than one of the requested attributes was found. |
T:System.TypeLoadException | A custom attribute type cannot be loaded. |
Definition at line 498 of file Attribute.cs.
◆ GetCustomAttribute() [2/8]
Retrieves a custom attribute applied to a member of a type. Parameters specify the member, the type of the custom attribute to search for, and whether to search ancestors of the member.
- Parameters
-
element | An object derived from the T:System.Reflection.MemberInfo class that describes a constructor, event, field, method, or property member of a class. |
attributeType | The type, or a base type, of the custom attribute to search for. |
inherit | If true , specifies to also search the ancestors of element for custom attributes. |
- Returns
- A reference to the single custom attribute of type attributeType that is applied to element , or
null
if there is no such attribute.
- Exceptions
-
T:System.ArgumentNullException | element or attributeType is null . |
T:System.ArgumentException | attributeType is not derived from T:System.Attribute. |
T:System.NotSupportedException | element is not a constructor, method, property, event, type, or field. |
T:System.Reflection.AmbiguousMatchException | More than one of the requested attributes was found. |
T:System.TypeLoadException | A custom attribute type cannot be loaded. |
Definition at line 517 of file Attribute.cs.
◆ GetCustomAttribute() [3/8]
Retrieves a custom attribute applied to a method parameter. Parameters specify the method parameter, and the type of the custom attribute to search for.
- Parameters
-
element | An object derived from the T:System.Reflection.ParameterInfo class that describes a parameter of a member of a class. |
attributeType | The type, or a base type, of the custom attribute to search for. |
- Returns
- A reference to the single custom attribute of type attributeType that is applied to element , or
null
if there is no such attribute.
- Exceptions
-
T:System.ArgumentNullException | element or attributeType is null . |
T:System.ArgumentException | attributeType is not derived from T:System.Attribute. |
T:System.Reflection.AmbiguousMatchException | More than one of the requested attributes was found. |
T:System.TypeLoadException | A custom attribute type cannot be loaded. |
Definition at line 689 of file Attribute.cs.
◆ GetCustomAttribute() [4/8]
Retrieves a custom attribute applied to a method parameter. Parameters specify the method parameter, the type of the custom attribute to search for, and whether to search ancestors of the method parameter.
- Parameters
-
element | An object derived from the T:System.Reflection.ParameterInfo class that describes a parameter of a member of a class. |
attributeType | The type, or a base type, of the custom attribute to search for. |
inherit | If true , specifies to also search the ancestors of element for custom attributes. |
- Returns
- A reference to the single custom attribute of type attributeType that is applied to element , or
null
if there is no such attribute.
- Exceptions
-
T:System.ArgumentNullException | element or attributeType is null . |
T:System.ArgumentException | attributeType is not derived from T:System.Attribute. |
T:System.Reflection.AmbiguousMatchException | More than one of the requested attributes was found. |
T:System.TypeLoadException | A custom attribute type cannot be loaded. |
Definition at line 706 of file Attribute.cs.
◆ GetCustomAttribute() [5/8]
Retrieves a custom attribute applied to a module. Parameters specify the module, and the type of the custom attribute to search for.
- Parameters
-
element | An object derived from the T:System.Reflection.Module class that describes a portable executable file. |
attributeType | The type, or a base type, of the custom attribute to search for. |
- Returns
- A reference to the single custom attribute of type attributeType that is applied to element , or
null
if there is no such attribute.
- Exceptions
-
T:System.ArgumentNullException | element or attributeType is null . |
T:System.ArgumentException | attributeType is not derived from T:System.Attribute. |
T:System.Reflection.AmbiguousMatchException | More than one of the requested attributes was found. |
Definition at line 838 of file Attribute.cs.
◆ GetCustomAttribute() [6/8]
static Attribute System.Attribute.GetCustomAttribute |
( |
Module |
element, |
|
|
Type |
attributeType, |
|
|
bool |
inherit |
|
) |
| |
|
static |
Retrieves a custom attribute applied to a module. Parameters specify the module, the type of the custom attribute to search for, and an ignored search option.
- Parameters
-
element | An object derived from the T:System.Reflection.Module class that describes a portable executable file. |
attributeType | The type, or a base type, of the custom attribute to search for. |
inherit | This parameter is ignored, and does not affect the operation of this method. |
- Returns
- A reference to the single custom attribute of type attributeType that is applied to element , or
null
if there is no such attribute.
- Exceptions
-
T:System.ArgumentNullException | element or attributeType is null . |
T:System.ArgumentException | attributeType is not derived from T:System.Attribute. |
T:System.Reflection.AmbiguousMatchException | More than one of the requested attributes was found. |
Definition at line 853 of file Attribute.cs.
◆ GetCustomAttribute() [7/8]
Retrieves a custom attribute applied to a specified assembly. Parameters specify the assembly and the type of the custom attribute to search for.
- Parameters
-
element | An object derived from the T:System.Reflection.Assembly class that describes a reusable collection of modules. |
attributeType | The type, or a base type, of the custom attribute to search for. |
- Returns
- A reference to the single custom attribute of type attributeType that is applied to element , or
null
if there is no such attribute.
- Exceptions
-
T:System.ArgumentNullException | element or attributeType is null . |
T:System.ArgumentException | attributeType is not derived from T:System.Attribute. |
T:System.Reflection.AmbiguousMatchException | More than one of the requested attributes was found. |
Definition at line 985 of file Attribute.cs.
◆ GetCustomAttribute() [8/8]
static Attribute System.Attribute.GetCustomAttribute |
( |
Assembly |
element, |
|
|
Type |
attributeType, |
|
|
bool |
inherit |
|
) |
| |
|
static |
Retrieves a custom attribute applied to an assembly. Parameters specify the assembly, the type of the custom attribute to search for, and an ignored search option.
- Parameters
-
element | An object derived from the T:System.Reflection.Assembly class that describes a reusable collection of modules. |
attributeType | The type, or a base type, of the custom attribute to search for. |
inherit | This parameter is ignored, and does not affect the operation of this method. |
- Returns
- A reference to the single custom attribute of type attributeType that is applied to element , or
null
if there is no such attribute.
- Exceptions
-
T:System.ArgumentNullException | element or attributeType is null . |
T:System.ArgumentException | attributeType is not derived from T:System.Attribute. |
T:System.Reflection.AmbiguousMatchException | More than one of the requested attributes was found. |
Definition at line 1000 of file Attribute.cs.
◆ GetCustomAttributes() [1/16]
Retrieves an array of the custom attributes applied to a member of a type. Parameters specify the member, and the type of the custom attribute to search for.
- Parameters
-
element | An object derived from the T:System.Reflection.MemberInfo class that describes a constructor, event, field, method, or property member of a class. |
type | The type, or a base type, of the custom attribute to search for. |
- Returns
- An T:System.Attribute array that contains the custom attributes of type type applied to element , or an empty array if no such custom attributes exist.
- Exceptions
-
T:System.ArgumentNullException | element or type is null . |
T:System.ArgumentException | type is not derived from T:System.Attribute. |
T:System.NotSupportedException | element is not a constructor, method, property, event, type, or field. |
T:System.TypeLoadException | A custom attribute type cannot be loaded. |
Definition at line 346 of file Attribute.cs.
◆ GetCustomAttributes() [2/16]
Retrieves an array of the custom attributes applied to a member of a type. Parameters specify the member, the type of the custom attribute to search for, and whether to search ancestors of the member.
- Parameters
-
element | An object derived from the T:System.Reflection.MemberInfo class that describes a constructor, event, field, method, or property member of a class. |
type | The type, or a base type, of the custom attribute to search for. |
inherit | If true , specifies to also search the ancestors of element for custom attributes. |
- Returns
- An T:System.Attribute array that contains the custom attributes of type type applied to element , or an empty array if no such custom attributes exist.
- Exceptions
-
T:System.ArgumentNullException | element or type is null . |
T:System.ArgumentException | type is not derived from T:System.Attribute. |
T:System.NotSupportedException | element is not a constructor, method, property, event, type, or field. |
T:System.TypeLoadException | A custom attribute type cannot be loaded. |
Definition at line 364 of file Attribute.cs.
◆ GetCustomAttributes() [3/16]
Retrieves an array of the custom attributes applied to a member of a type. A parameter specifies the member.
- Parameters
-
element | An object derived from the T:System.Reflection.MemberInfo class that describes a constructor, event, field, method, or property member of a class. |
- Returns
- An T:System.Attribute array that contains the custom attributes applied to element , or an empty array if no such custom attributes exist.
- Exceptions
-
T:System.ArgumentNullException | element is null . |
T:System.NotSupportedException | element is not a constructor, method, property, event, type, or field. |
T:System.TypeLoadException | A custom attribute type cannot be loaded. |
Definition at line 398 of file Attribute.cs.
◆ GetCustomAttributes() [4/16]
Retrieves an array of the custom attributes applied to a member of a type. Parameters specify the member, the type of the custom attribute to search for, and whether to search ancestors of the member.
- Parameters
-
element | An object derived from the T:System.Reflection.MemberInfo class that describes a constructor, event, field, method, or property member of a class. |
inherit | If true , specifies to also search the ancestors of element for custom attributes. |
- Returns
- An T:System.Attribute array that contains the custom attributes applied to element , or an empty array if no such custom attributes exist.
- Exceptions
-
T:System.ArgumentNullException | element is null . |
T:System.NotSupportedException | element is not a constructor, method, property, event, type, or field. |
T:System.TypeLoadException | A custom attribute type cannot be loaded. |
Definition at line 413 of file Attribute.cs.
◆ GetCustomAttributes() [5/16]
Retrieves an array of the custom attributes applied to a method parameter. A parameter specifies the method parameter.
- Parameters
-
element | An object derived from the T:System.Reflection.ParameterInfo class that describes a parameter of a member of a class. |
- Returns
- An T:System.Attribute array that contains the custom attributes applied to element , or an empty array if no such custom attributes exist.
- Exceptions
-
T:System.ArgumentNullException | element is null . |
T:System.TypeLoadException | A custom attribute type cannot be loaded. |
Definition at line 538 of file Attribute.cs.
◆ GetCustomAttributes() [6/16]
Retrieves an array of the custom attributes applied to a method parameter. Parameters specify the method parameter, and the type of the custom attribute to search for.
- Parameters
-
element | An object derived from the T:System.Reflection.ParameterInfo class that describes a parameter of a member of a class. |
attributeType | The type, or a base type, of the custom attribute to search for. |
- Returns
- An T:System.Attribute array that contains the custom attributes of type attributeType applied to element , or an empty array if no such custom attributes exist.
- Exceptions
-
T:System.ArgumentNullException | element or attributeType is null . |
T:System.ArgumentException | attributeType is not derived from T:System.Attribute. |
T:System.TypeLoadException | A custom attribute type cannot be loaded. |
Definition at line 553 of file Attribute.cs.
◆ GetCustomAttributes() [7/16]
Retrieves an array of the custom attributes applied to a method parameter. Parameters specify the method parameter, the type of the custom attribute to search for, and whether to search ancestors of the method parameter.
- Parameters
-
element | An object derived from the T:System.Reflection.ParameterInfo class that describes a parameter of a member of a class. |
attributeType | The type, or a base type, of the custom attribute to search for. |
inherit | If true , specifies to also search the ancestors of element for custom attributes. |
- Returns
- An T:System.Attribute array that contains the custom attributes of type attributeType applied to element , or an empty array if no such custom attributes exist.
- Exceptions
-
T:System.ArgumentNullException | element or attributeType is null . |
T:System.ArgumentException | attributeType is not derived from T:System.Attribute. |
T:System.TypeLoadException | A custom attribute type cannot be loaded. |
Definition at line 569 of file Attribute.cs.
◆ GetCustomAttributes() [8/16]
Retrieves an array of the custom attributes applied to a method parameter. Parameters specify the method parameter, and whether to search ancestors of the method parameter.
- Parameters
-
element | An object derived from the T:System.Reflection.ParameterInfo class that describes a parameter of a member of a class. |
inherit | If true , specifies to also search the ancestors of element for custom attributes. |
- Returns
- An T:System.Attribute array that contains the custom attributes applied to element , or an empty array if no such custom attributes exist.
- Exceptions
-
T:System.ArgumentException | The P:System.Reflection.ParameterInfo.Member property of element is null.
|
T:System.ArgumentNullException | element is null . |
T:System.TypeLoadException | A custom attribute type cannot be loaded. |
Definition at line 604 of file Attribute.cs.
◆ GetCustomAttributes() [9/16]
static Attribute [] System.Attribute.GetCustomAttributes |
( |
Module |
element, |
|
|
Type |
attributeType |
|
) |
| |
|
static |
Retrieves an array of the custom attributes applied to a module. Parameters specify the module, and the type of the custom attribute to search for.
- Parameters
-
element | An object derived from the T:System.Reflection.Module class that describes a portable executable file. |
attributeType | The type, or a base type, of the custom attribute to search for. |
- Returns
- An T:System.Attribute array that contains the custom attributes of type attributeType applied to element , or an empty array if no such custom attributes exist.
- Exceptions
-
T:System.ArgumentNullException | element or attributeType is null . |
T:System.ArgumentException | attributeType is not derived from T:System.Attribute. |
Definition at line 732 of file Attribute.cs.
◆ GetCustomAttributes() [10/16]
Retrieves an array of the custom attributes applied to a module. A parameter specifies the module.
- Parameters
-
element | An object derived from the T:System.Reflection.Module class that describes a portable executable file. |
- Returns
- An T:System.Attribute array that contains the custom attributes applied to element , or an empty array if no such custom attributes exist.
- Exceptions
-
T:System.ArgumentNullException | element is null . |
Definition at line 742 of file Attribute.cs.
◆ GetCustomAttributes() [11/16]
static Attribute [] System.Attribute.GetCustomAttributes |
( |
Module |
element, |
|
|
bool |
inherit |
|
) |
| |
|
static |
Retrieves an array of the custom attributes applied to a module. Parameters specify the module, and an ignored search option.
- Parameters
-
element | An object derived from the T:System.Reflection.Module class that describes a portable executable file. |
inherit | This parameter is ignored, and does not affect the operation of this method. |
- Returns
- An T:System.Attribute array that contains the custom attributes applied to element , or an empty array if no such custom attributes exist.
- Exceptions
-
T:System.ArgumentNullException | element or attributeType is null . |
Definition at line 753 of file Attribute.cs.
◆ GetCustomAttributes() [12/16]
static Attribute [] System.Attribute.GetCustomAttributes |
( |
Module |
element, |
|
|
Type |
attributeType, |
|
|
bool |
inherit |
|
) |
| |
|
static |
Retrieves an array of the custom attributes applied to a module. Parameters specify the module, the type of the custom attribute to search for, and an ignored search option.
- Parameters
-
element | An object derived from the T:System.Reflection.Module class that describes a portable executable file. |
attributeType | The type, or a base type, of the custom attribute to search for. |
inherit | This parameter is ignored, and does not affect the operation of this method. |
- Returns
- An T:System.Attribute array that contains the custom attributes of type attributeType applied to element , or an empty array if no such custom attributes exist.
- Exceptions
-
T:System.ArgumentNullException | element or attributeType is null . |
T:System.ArgumentException | attributeType is not derived from T:System.Attribute. |
Definition at line 771 of file Attribute.cs.
◆ GetCustomAttributes() [13/16]
Retrieves an array of the custom attributes applied to an assembly. Parameters specify the assembly, and the type of the custom attribute to search for.
- Parameters
-
element | An object derived from the T:System.Reflection.Assembly class that describes a reusable collection of modules. |
attributeType | The type, or a base type, of the custom attribute to search for. |
- Returns
- An T:System.Attribute array that contains the custom attributes of type attributeType applied to element , or an empty array if no such custom attributes exist.
- Exceptions
-
T:System.ArgumentNullException | element or attributeType is null . |
T:System.ArgumentException | attributeType is not derived from T:System.Attribute. |
Definition at line 876 of file Attribute.cs.
◆ GetCustomAttributes() [14/16]
static Attribute [] System.Attribute.GetCustomAttributes |
( |
Assembly |
element, |
|
|
Type |
attributeType, |
|
|
bool |
inherit |
|
) |
| |
|
static |
Retrieves an array of the custom attributes applied to an assembly. Parameters specify the assembly, the type of the custom attribute to search for, and an ignored search option.
- Parameters
-
element | An object derived from the T:System.Reflection.Assembly class that describes a reusable collection of modules. |
attributeType | The type, or a base type, of the custom attribute to search for. |
inherit | This parameter is ignored, and does not affect the operation of this method. |
- Returns
- An T:System.Attribute array that contains the custom attributes of type attributeType applied to element , or an empty array if no such custom attributes exist.
- Exceptions
-
T:System.ArgumentNullException | element or attributeType is null . |
T:System.ArgumentException | attributeType is not derived from T:System.Attribute. |
Definition at line 890 of file Attribute.cs.
◆ GetCustomAttributes() [15/16]
Retrieves an array of the custom attributes applied to an assembly. A parameter specifies the assembly.
- Parameters
-
element | An object derived from the T:System.Reflection.Assembly class that describes a reusable collection of modules. |
- Returns
- An T:System.Attribute array that contains the custom attributes applied to element , or an empty array if no such custom attributes exist.
- Exceptions
-
T:System.ArgumentNullException | element is null . |
Definition at line 913 of file Attribute.cs.
◆ GetCustomAttributes() [16/16]
static Attribute [] System.Attribute.GetCustomAttributes |
( |
Assembly |
element, |
|
|
bool |
inherit |
|
) |
| |
|
static |
Retrieves an array of the custom attributes applied to an assembly. Parameters specify the assembly, and an ignored search option.
- Parameters
-
element | An object derived from the T:System.Reflection.Assembly class that describes a reusable collection of modules. |
inherit | This parameter is ignored, and does not affect the operation of this method. |
- Returns
- An T:System.Attribute array that contains the custom attributes applied to element , or an empty array if no such custom attributes exist.
- Exceptions
-
T:System.ArgumentNullException | element or attributeType is null . |
Definition at line 924 of file Attribute.cs.
◆ GetHashCode()
override int System.Attribute.GetHashCode |
( |
| ) |
|
Returns the hash code for this instance.
- Returns
- A 32-bit signed integer hash code.
Definition at line 1092 of file Attribute.cs.
◆ IsDefaultAttribute()
virtual bool System.Attribute.IsDefaultAttribute |
( |
| ) |
|
|
virtual |
When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class.
- Returns
true
if this instance is the default attribute for the class; otherwise, false
.
Reimplemented in System.ComponentModel.CategoryAttribute, System.ComponentModel.BindableAttribute, System.ComponentModel.DesignerCategoryAttribute, System.ComponentModel.Design.HelpKeywordAttribute, System.ComponentModel.DescriptionAttribute, System.ComponentModel.DisplayNameAttribute, System.ComponentModel.ListBindableAttribute, System.ComponentModel.InheritanceAttribute, System.ComponentModel.DataObjectAttribute, System.ComponentModel.DesignTimeVisibleAttribute, System.ComponentModel.ExtenderProvidedPropertyAttribute, System.ComponentModel.DesignerSerializationVisibilityAttribute, System.ComponentModel.PasswordPropertyTextAttribute, System.ComponentModel.RecommendedAsConfigurableAttribute, System.ComponentModel.BrowsableAttribute, System.ComponentModel.ImmutableObjectAttribute, System.ComponentModel.MergablePropertyAttribute, System.ComponentModel.ReadOnlyAttribute, System.ComponentModel.RunInstallerAttribute, System.ComponentModel.NotifyParentPropertyAttribute, System.ComponentModel.ToolboxItemAttribute, System.ComponentModel.ParenthesizePropertyNameAttribute, System.ComponentModel.RefreshPropertiesAttribute, System.ComponentModel.DesignOnlyAttribute, and System.ComponentModel.LocalizableAttribute.
Definition at line 1124 of file Attribute.cs.
◆ IsDefined() [1/8]
static bool System.Attribute.IsDefined |
( |
MemberInfo |
element, |
|
|
Type |
attributeType |
|
) |
| |
|
static |
Determines whether any custom attributes are applied to a member of a type. Parameters specify the member, and the type of the custom attribute to search for.
- Parameters
-
element | An object derived from the T:System.Reflection.MemberInfo class that describes a constructor, event, field, method, type, or property member of a class. |
attributeType | The type, or a base type, of the custom attribute to search for. |
- Returns
true
if a custom attribute of type attributeType is applied to element ; otherwise, false
.
- Exceptions
-
T:System.ArgumentNullException | element or attributeType is null . |
T:System.ArgumentException | attributeType is not derived from T:System.Attribute. |
T:System.NotSupportedException | element is not a constructor, method, property, event, type, or field. |
Definition at line 442 of file Attribute.cs.
◆ IsDefined() [2/8]
static bool System.Attribute.IsDefined |
( |
MemberInfo |
element, |
|
|
Type |
attributeType, |
|
|
bool |
inherit |
|
) |
| |
|
static |
Determines whether any custom attributes are applied to a member of a type. Parameters specify the member, the type of the custom attribute to search for, and whether to search ancestors of the member.
- Parameters
-
element | An object derived from the T:System.Reflection.MemberInfo class that describes a constructor, event, field, method, type, or property member of a class. |
attributeType | The type, or a base type, of the custom attribute to search for. |
inherit | If true , specifies to also search the ancestors of element for custom attributes. |
- Returns
true
if a custom attribute of type attributeType is applied to element ; otherwise, false
.
- Exceptions
-
T:System.ArgumentNullException | element or attributeType is null . |
T:System.ArgumentException | attributeType is not derived from T:System.Attribute. |
T:System.NotSupportedException | element is not a constructor, method, property, event, type, or field. |
Definition at line 460 of file Attribute.cs.
◆ IsDefined() [3/8]
Determines whether any custom attributes are applied to a method parameter. Parameters specify the method parameter, and the type of the custom attribute to search for.
- Parameters
-
element | An object derived from the T:System.Reflection.ParameterInfo class that describes a parameter of a member of a class. |
attributeType | The type, or a base type, of the custom attribute to search for. |
- Returns
true
if a custom attribute of type attributeType is applied to element ; otherwise, false
.
- Exceptions
-
T:System.ArgumentNullException | element or attributeType is null . |
T:System.ArgumentException | attributeType is not derived from T:System.Attribute. |
Definition at line 632 of file Attribute.cs.
◆ IsDefined() [4/8]
static bool System.Attribute.IsDefined |
( |
ParameterInfo |
element, |
|
|
Type |
attributeType, |
|
|
bool |
inherit |
|
) |
| |
|
static |
Determines whether any custom attributes are applied to a method parameter. Parameters specify the method parameter, the type of the custom attribute to search for, and whether to search ancestors of the method parameter.
- Parameters
-
element | An object derived from the T:System.Reflection.ParameterInfo class that describes a parameter of a member of a class. |
attributeType | The type, or a base type, of the custom attribute to search for. |
inherit | If true , specifies to also search the ancestors of element for custom attributes. |
- Returns
true
if a custom attribute of type attributeType is applied to element ; otherwise, false
.
- Exceptions
-
T:System.ArgumentNullException | element or attributeType is null . |
T:System.ArgumentException | attributeType is not derived from T:System.Attribute. |
T:System.ExecutionEngineException | element is not a method, constructor, or type. |
Definition at line 650 of file Attribute.cs.
◆ IsDefined() [5/8]
static bool System.Attribute.IsDefined |
( |
Module |
element, |
|
|
Type |
attributeType |
|
) |
| |
|
static |
Determines whether any custom attributes of a specified type are applied to a module. Parameters specify the module, and the type of the custom attribute to search for.
- Parameters
-
element | An object derived from the T:System.Reflection.Module class that describes a portable executable file. |
attributeType | The type, or a base type, of the custom attribute to search for. |
- Returns
true
if a custom attribute of type attributeType is applied to element ; otherwise, false
.
- Exceptions
-
T:System.ArgumentNullException | element or attributeType is null . |
T:System.ArgumentException | attributeType is not derived from T:System.Attribute. |
Definition at line 797 of file Attribute.cs.
◆ IsDefined() [6/8]
static bool System.Attribute.IsDefined |
( |
Module |
element, |
|
|
Type |
attributeType, |
|
|
bool |
inherit |
|
) |
| |
|
static |
Determines whether any custom attributes are applied to a module. Parameters specify the module, the type of the custom attribute to search for, and an ignored search option.
- Parameters
-
element | An object derived from the T:System.Reflection.Module class that describes a portable executable file. |
attributeType | The type, or a base type, of the custom attribute to search for. |
inherit | This parameter is ignored, and does not affect the operation of this method. |
- Returns
true
if a custom attribute of type attributeType is applied to element ; otherwise, false
.
- Exceptions
-
T:System.ArgumentNullException | element or attributeType is null . |
T:System.ArgumentException | attributeType is not derived from T:System.Attribute. |
Definition at line 812 of file Attribute.cs.
◆ IsDefined() [7/8]
static bool System.Attribute.IsDefined |
( |
Assembly |
element, |
|
|
Type |
attributeType |
|
) |
| |
|
static |
Determines whether any custom attributes are applied to an assembly. Parameters specify the assembly, and the type of the custom attribute to search for.
- Parameters
-
element | An object derived from the T:System.Reflection.Assembly class that describes a reusable collection of modules. |
attributeType | The type, or a base type, of the custom attribute to search for. |
- Returns
true
if a custom attribute of type attributeType is applied to element ; otherwise, false
.
- Exceptions
-
T:System.ArgumentNullException | element or attributeType is null . |
T:System.ArgumentException | attributeType is not derived from T:System.Attribute. |
Definition at line 943 of file Attribute.cs.
◆ IsDefined() [8/8]
static bool System.Attribute.IsDefined |
( |
Assembly |
element, |
|
|
Type |
attributeType, |
|
|
bool |
inherit |
|
) |
| |
|
static |
Determines whether any custom attributes are applied to an assembly. Parameters specify the assembly, the type of the custom attribute to search for, and an ignored search option.
- Parameters
-
element | An object derived from the T:System.Reflection.Assembly class that describes a reusable collection of modules. |
attributeType | The type, or a base type, of the custom attribute to search for. |
inherit | This parameter is ignored, and does not affect the operation of this method. |
- Returns
true
if a custom attribute of type attributeType is applied to element ; otherwise, false
.
- Exceptions
-
T:System.ArgumentNullException | element or attributeType is null . |
T:System.ArgumentException | attributeType is not derived from T:System.Attribute. |
Definition at line 958 of file Attribute.cs.
◆ Match()
virtual bool System.Attribute.Match |
( |
object |
obj | ) |
|
|
virtual |
◆ TypeId
virtual object System.Attribute.TypeId => GetType() |
When implemented in a derived class, gets a unique identifier for this T:System.Attribute.
- Returns
- An T:System.Object that is a unique identifier for the attribute.
Definition at line 19 of file Attribute.cs.
The documentation for this class was generated from the following file: