Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
private object GetFieldValue(ClrHeap heap, ulong address, string fieldName)
{
    var type = heap.GetObjectType(address);
    ClrInstanceField field = type.GetFieldByName(fieldName);
    if (field == null)
        return null;
    return field.GetValue(address);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment