public ExceptionInfo(object o) { StartAddress = (int)s_miGetStartAddress.Invoke(o, null); EndAddress = (int)s_miGetEndAddress.Invoke(o, null); var n = (int)s_miGetNumberOfCatches.Invoke(o, null); if (n > 0) { var handlerStart = (int[])s_miGetCatchAddresses.Invoke(o, null); var handlerEnd = (int[])s_miGetCatchEndAddresses.Invoke(o, null); var catchType = (Type[])s_miGetCatchClass.Invoke(o, null); var types = (int[])s_miGetExceptionTypes.Invoke(o, null); Handlers = new HandlerInfo[n]; for (var i = 0; i < n; i++) { Handlers[i] = new HandlerInfo(handlerStart[i], handlerEnd[i], catchType[i], types[i]); } } else { Handlers = Array.Empty<HandlerInfo>(); } }