Browse documentation

Delegate AccessTools.StructFieldRef<T, F>

Namespace
HarmonyLib
Assembly
0Harmony.dll

A readable/assignable reference delegate to an instance field of a struct

public delegate ref F AccessTools.StructFieldRef<T, F>(ref T instance) where T : struct

Parameters

instance T

A reference to the runtime instance to access the field

Returns

F

A readable/assignable reference to the field

Type Parameters

T

The struct that defines the instance field

F

The type of the field; or if the field's type is a reference type (a class or interface, NOT a struct or other value type), a type that is assignable from that type; or if the field's type is an enum type, either that type or the underlying integral type of that enum type

Constructors

StructFieldRef(object, IntPtr)

public StructFieldRef(object @object, IntPtr method)

Parameters

object object
method IntPtr

Methods

BeginInvoke(ref T, AsyncCallback, object)

public virtual IAsyncResult BeginInvoke(ref T instance, AsyncCallback callback, object @object)

Parameters

instance T
callback AsyncCallback
object object

Returns

IAsyncResult

EndInvoke(ref T, IAsyncResult)

public virtual ref F EndInvoke(ref T instance, IAsyncResult result)

Parameters

instance T
result IAsyncResult

Returns

F

Invoke(ref T)

public virtual ref F Invoke(ref T instance)

Parameters

instance T

Returns

F
Harmony 3 preview

For the stable release, read the 2.x documentation.