Open sandboxFocus

Interface IField

Represents a field. Note that fields can be promoted to properties by aspects.

Namespace: Metalama.Framework.Code
Assembly: Metalama.Framework.dll
Syntax
public interface IField : IFieldOrProperty, IFieldOrPropertyOrIndexer, IHasAccessors, IMember, IMemberOrNamedType, INamedDeclaration, IDeclaration, IDisplayable, IDiagnosticLocation, ICompilationElement, IMeasurable, IEquatable<IDeclaration>, IFieldOrPropertyInvoker, IExpression, IHasType

Properties

Name Description
ConstantValue

Gets the value of the field, if the field is a const. Not to be confused with the InitializerExpression, which is available even if the field is not const, but only when the field is defined in source code (as opposed to being defined in a referenced assembly).

Definition

Gets the definition of the field. If the current declaration is a field of a generic type instance, this returns the field in the generic type definition. Otherwise, it returns the current instance.

OverridingProperty

Gets the property that this field has been overridden into. The opposite side of this relationship is the OriginalField of the IProperty interface.

Methods

Name Description
ToFieldInfo()
ToRef()

Extension Methods