TypeDelegator.GetCustomAttributes Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns all the custom attributes defined for this type.
Overloads
GetCustomAttributes(Boolean) |
Returns all the custom attributes defined for this type, specifying whether to search the type's inheritance chain. |
GetCustomAttributes(Type, Boolean) |
Returns an array of custom attributes identified by type. |
GetCustomAttributes(Boolean)
- Source:
- TypeDelegator.cs
- Source:
- TypeDelegator.cs
- Source:
- TypeDelegator.cs
Returns all the custom attributes defined for this type, specifying whether to search the type's inheritance chain.
public:
override cli::array <System::Object ^> ^ GetCustomAttributes(bool inherit);
public override object[] GetCustomAttributes (bool inherit);
override this.GetCustomAttributes : bool -> obj[]
Public Overrides Function GetCustomAttributes (inherit As Boolean) As Object()
Parameters
- inherit
- Boolean
Specifies whether to search this type's inheritance chain to find the attributes.
Returns
An array of objects containing all the custom attributes defined for this type.
Exceptions
A custom attribute type cannot be loaded.
Applies to
GetCustomAttributes(Type, Boolean)
- Source:
- TypeDelegator.cs
- Source:
- TypeDelegator.cs
- Source:
- TypeDelegator.cs
Returns an array of custom attributes identified by type.
public:
override cli::array <System::Object ^> ^ GetCustomAttributes(Type ^ attributeType, bool inherit);
public override object[] GetCustomAttributes (Type attributeType, bool inherit);
override this.GetCustomAttributes : Type * bool -> obj[]
Public Overrides Function GetCustomAttributes (attributeType As Type, inherit As Boolean) As Object()
Parameters
- attributeType
- Type
An array of custom attributes identified by type.
- inherit
- Boolean
Specifies whether to search this type's inheritance chain to find the attributes.
Returns
An array of objects containing the custom attributes defined in this type that match the attributeType
parameter, specifying whether to search the type's inheritance chain, or null
if no custom attributes are defined on this type.
Exceptions
attributeType
is null
.
A custom attribute type cannot be loaded.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기