Metalama//API Documentation/Aspect API/Metalama.​Framework.​Code/IField
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, 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).

Methods

Name Description
ToFieldInfo()

Extension Methods

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