Open sandboxFocus

Class FieldOrPropertyInfo

Represents a reflection FieldInfo or a PropertyInfo.

Inheritance
FieldOrPropertyInfo
Namespace: Metalama.Framework.RunTime
Assembly: Metalama.Framework.RunTime.dll
Syntax
public class FieldOrPropertyInfo : MemberInfo, ICustomAttributeProvider

Constructors

Name Description
FieldOrPropertyInfo(FieldInfo)

Initializes a new instance of the FieldOrPropertyInfo class that represents a field.

FieldOrPropertyInfo(PropertyInfo)

Initializes a new instance of the FieldOrPropertyInfo class that represents a property.

Properties

Name Description
AsField

Gets the FieldInfo if this represents a field, otherwise returns null.

AsPropertyOrIndexer

Gets the PropertyInfo if this represents a property, otherwise returns null.

DeclaringType
MemberType
Name
ReflectedType
UnderlyingMemberInfo
ValueType

Methods

Name Description
GetCustomAttributes(bool)
GetCustomAttributes(Type, bool)
GetValue(object?)
IsDefined(Type, bool)
SetValue(object?, object?)

Extension Methods