Metalama 1.0 / / Metalama Documentation / Aspect API / Metalama.​Framework.​Code / IField

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, IMemberWithAccessors, IMember, IMemberOrNamedType, INamedDeclaration, IDeclaration, IDisplayable, IDiagnosticLocation, ICompilationElement, IMeasurable, 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).

Methods

Name Description
ToFieldInfo()

Extension Methods

GenericExtensions.ForTypeInstance(IField, INamedType)
SymbolExtensions.GetSymbol(IField)