Share via


CodeTypeMember.Attributes 속성

정의

멤버의 특성을 가져오거나 설정합니다.

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

속성 값

멤버의 특성을 나타내는 데 사용하는 MemberAttributes 값의 비트 조합입니다. 기본값은 Private | Final입니다.

설명

이 속성은 형식 멤버의 특성을 지정하는 데 사용됩니다.

멤버 특성은 각 그룹에 대한 마스크를 사용하여 그룹으로 분류됩니다. 액세스 그룹은 , , PrivateFamily또는 Assembly용어를 Public포함하는 플래그로 구성됩니다. scope 그룹에는 , , FinalStatic, OverrideConst에 대한 Abstract플래그가 포함됩니다. 마스크는 AccessMask 액세스 특성을 식별합니다. 마스크는 ScopeMask scope 특성을 식별합니다. 속성의 기본값에는 Attributes 액세스 및 scope 모두의 플래그가 포함됩니다. 액세스 또는 scope 변경하려면 먼저 기존 플래그를 마스킹한 다음 새 값을 설정합니다. 예를 들어 생성자(라는 ) constructor1를 public으로 식별하는 코드 문은 입니다 constructor1.Attributes = (constructor1.Attributes & ~MemberAttributes.AccessMask) | MemberAttributes.Public;.

적용 대상

추가 정보