MemberElement Class
A member of a type: a method, a constructor, a property, a field or an event.
public abstract class MemberElementProperties
| Name | Description |
|---|---|
| Accessibility | Gets the declared accessibility of the member. |
| Attributes | Gets the attributes applied to the member. |
| DeclaringType | Gets the type that declares the member. |
| Dependencies | Gets the dependencies of the declaration and the code of the member, including the code of its lambdas and local functions. |
| IsStatic | Gets a value indicating whether the member is static. |
| Location | Gets the first statement of the member when the PDB is available, or null. |
| Name | Gets the name of the member as written in metadata (.ctor for a constructor). |
Accessibility
Gets the declared accessibility of the member.
public abstract ElementAccessibility Accessibility { get; }Property value
Attributes
Gets the attributes applied to the member.
public abstract IReadOnlyList<AttributeElement> Attributes { get; }Property value
DeclaringType
MemberElement.csDependencies
MemberElement.csGets the dependencies of the declaration and the code of the member, including the code of its lambdas and local functions.
public IReadOnlyList<Dependency> Dependencies { get; }Property value
IsStatic
Location
Gets the first statement of the member when the PDB is available, or null.
public abstract SourceLocation? Location { get; }Property value
Name
MemberElement.csMethods
| Name | Description |
|---|---|
| HasAttribute(Type) | Determines whether the member has an attribute of the given type. |
| ToString() | Returns the member as DeclaringType.Name. |