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. The dependencies of an accessor of a property or an event are the ones of its own code: the property or the event lists the dependencies of all its accessors. |
| IsPublic | Gets a value indicating whether the member is declared public. A property or an event is public when one of its accessors is public. |
| 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. The dependencies of an accessor of a property or an event are the ones of its own code: the property or the event lists the dependencies of all its accessors.
public IReadOnlyList<Dependency> Dependencies { get; }Property value
IsPublic
MemberElement.csIsStatic
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. |