Mono.Debugger.Backend.Mono.MetadataHelper.MonoClassGetFieldType C# (CSharp) Method

MonoClassGetFieldType() public method

public MonoClassGetFieldType ( TargetMemoryAccess memory, TargetAddress klass, int index ) : TargetAddress
memory TargetMemoryAccess
klass TargetAddress
index int
return TargetAddress
        public TargetAddress MonoClassGetFieldType(TargetMemoryAccess memory, TargetAddress klass,
							    int index)
        {
            int offset = index * MonoMetadataInfo.FieldInfoSize +
                MonoMetadataInfo.FieldInfoTypeOffset;

            TargetAddress fields = memory.ReadAddress (
                klass + MonoMetadataInfo.KlassFieldOffset);
            if (fields.IsNull)
                throw new TargetException (TargetError.ClassNotInitialized);

            return memory.ReadAddress (fields + offset);
        }