Show / Hide Table of Contents

Class Type<T>.Field<V>

Provides typed access to instance field declared in type T.

Inheritance
Object
Type<T>.Field<V>
Namespace: DotNext.Reflection
Assembly: DotNext.Reflection.dll
Syntax
public static class Field<V> : object
Type Parameters
Name Description
V

Type of field value.

Methods

| Improve this Doc View Source

Get(String, Boolean)

Gets instance field.

Declaration
public static Field<T, V> 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, V>

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

| Improve this Doc View Source

GetStatic(String, Boolean)

Gets static field.

Declaration
public static Field<V> 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<V>

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, V> 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, V>

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<V> 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<V>

Instance field.

Exceptions
Type Condition
MissingEventException

Field doesn't exist.

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