CodeTypeParameter.CustomAttributes Property
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.
Gets the custom attributes of the type parameter.
public:
property System::CodeDom::CodeAttributeDeclarationCollection ^ CustomAttributes { System::CodeDom::CodeAttributeDeclarationCollection ^ get(); };
public System.CodeDom.CodeAttributeDeclarationCollection CustomAttributes { get; }
member this.CustomAttributes : System.CodeDom.CodeAttributeDeclarationCollection
Public ReadOnly Property CustomAttributes As CodeAttributeDeclarationCollection
Property Value
A CodeAttributeDeclarationCollection that indicates the custom attributes of the type parameter. The default is null
.
Examples
The following code example shows the use of the CustomAttributes property to add a new custom attribute. This example is part of a larger example provided for the CodeTypeParameter class.
kType.CustomAttributes.Add(new CodeAttributeDeclaration(
"System.ComponentModel.DescriptionAttribute",
new CodeAttributeArgument(new CodePrimitiveExpression("KeyType"))));
kType.CustomAttributes.Add _
(New CodeAttributeDeclaration("System.ComponentModel.DescriptionAttribute", _
New CodeAttributeArgument(New CodePrimitiveExpression("KeyType"))))
Remarks
This property can be used to add metadata attributes to the declaration of the type parameter.
Caution
This property is null
by default and should be checked before referencing.
Applies to
See also
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기