System.CodeDom.CodeTypeMember.Attributes Property

Gets or sets the attributes of the member.

Syntax

public MemberAttributes Attributes { get; set; }

Value

Documentation for this section has not yet been entered.

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 MemberAttributes.Abstract, MemberAttributes.Final, MemberAttributes.Static, MemberAttributes.Override, and MemberAttributes.Const. The MemberAttributes.AccessMask mask identifies the access attributes. The MemberAttributes.ScopeMask mask identifies the scope attributes. The default value for the CodeTypeMember.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;.

Requirements

Namespace: System.CodeDom
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0