다음을 통해 공유


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. 범위 그룹에는 , , 및 Const에 대한 Abstract플래그가 Override포함Static됩니다. Final 마스크는 AccessMask 액세스 특성을 식별합니다. 마스크는 ScopeMask 범위 특성을 식별합니다. 속성의 Attributes 기본값에는 액세스 및 범위의 플래그가 모두 포함됩니다. 액세스 또는 범위를 변경하려면 먼저 기존 플래그를 마스킹한 다음 새 값을 설정합니다. 예를 들어 생성자(명명됨 constructor1)를 public으로 식별하는 코드 문은 다음과 같습니다 constructor1.Attributes = (constructor1.Attributes & ~MemberAttributes.AccessMask) | MemberAttributes.Public;.

적용 대상

추가 정보