Mono.Debugger.Languages.Mono.MonoArrayType.GetElementSize C# (CSharp) Method

GetElementSize() private method

private GetElementSize ( TargetMemoryAccess target ) : int
target TargetMemoryAccess
return int
        internal override int GetElementSize(TargetMemoryAccess target)
        {
            TargetType element_type;
            if (ElementType is MonoEnumType)
                element_type = ((MonoEnumType) ElementType).ClassType;
            else
                element_type = ElementType;

            IMonoStructType stype = element_type as IMonoStructType;
            if ((stype == null) || stype.Type.IsByRef)
                return base.GetElementSize (target);

            MonoClassInfo cinfo = stype.ResolveClass (target, true);
            return cinfo.GetInstanceSize (target);
        }