Table of Contents

Method AddReference

Namespace
MonoMod.Cil
Assembly
MonoMod.Utils.dll

AddReference<T>(in T?)

Bind an arbitary object to an ILContext for static retrieval.
public int AddReference<T>(in T? value)

Parameters

value T
The object to store.

Returns

int
The id to use in combination with the typeparam for object retrieval.

Type Parameters

T
The type of the object. The combination of typeparam and id provides the unique static reference.