Show / Hide Table of Contents

Class Type<T>.Field<TValue>

Provides typed access to instance field declared in type T.

Inheritance
Object
Type<T>.Field<TValue>
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: DotNext.Reflection
Assembly: DotNext.Reflection.dll
Syntax
public static class Field<TValue>
Type Parameters
Name Description
TValue

Type of field value.

Methods

| Improve this Doc View Source

Get(String, Boolean)

Gets instance field.

Declaration
public static Field<T, TValue> Get(string fieldName, bool nonPublic = false)
Parameters
Type Name Description
String fieldName

Name of field.

Boolean nonPublic

true to reflect non-public field.

Returns
Type Description
Field<T, TValue>

Instance field; or null, if field doesn't exist.

| Improve this Doc View Source

GetStatic(String, Boolean)

Gets static field.

Declaration
public static Field<TValue> GetStatic(string fieldName, bool nonPublic = false)
Parameters
Type Name Description
String fieldName

Name of field.

Boolean nonPublic

true to reflect non-public field.

Returns
Type Description
Field<TValue>

Instance field; or null, if field doesn't exist.

| Improve this Doc View Source

Require(String, Boolean)

Gets instance field.

Declaration
public static Field<T, TValue> Require(string fieldName, bool nonPublic = false)
Parameters
Type Name Description
String fieldName

Name of field.

Boolean nonPublic

true to reflect non-public field.

Returns
Type Description
Field<T, TValue>

Instance field.

Exceptions
Type Condition
MissingEventException

Field doesn't exist.

| Improve this Doc View Source

RequireStatic(String, Boolean)

Gets static field.

Declaration
public static Field<TValue> RequireStatic(string fieldName, bool nonPublic = false)
Parameters
Type Name Description
String fieldName

Name of field.

Boolean nonPublic

true to reflect non-public field.

Returns
Type Description
Field<TValue>

Instance field.

Exceptions
Type Condition
MissingEventException

Field doesn't exist.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX