CodeTypeMember.Attributes 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 or sets the attributes of the member.
public:
property System::CodeDom::MemberAttributes Attributes { System::CodeDom::MemberAttributes get(); void set(System::CodeDom::MemberAttributes value); };
public System.CodeDom.MemberAttributes Attributes { get; set; }
member this.Attributes : System.CodeDom.MemberAttributes with get, set
Public Property Attributes As MemberAttributes
Property Value
A bitwise combination of the MemberAttributes values used to indicate the attributes of the member. The default value is Private | Final.
Remarks
This property is used to specify the attributes of the type member.
Member attributes are classified in groups, with a mask for each group. The access group consists of flags containing the terms Public
, Private
, Family
, or Assembly
. The scope group includes flags for Abstract, Final, Static, Override, and Const. The AccessMask mask identifies the access attributes. The ScopeMask mask identifies the scope attributes. The default value for the Attributes property includes flags from both access and scope. To change either access or scope, first mask out the existing flags and then set the new value. For example, the code statement to identify a constructor (named constructor1
) as public is constructor1.Attributes = (constructor1.Attributes & ~MemberAttributes.AccessMask) | MemberAttributes.Public;
.
Applies to
See also
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기