private static ComMethodInformation GetMethodInformation( System.Runtime.InteropServices.ComTypes.FUNCDESC funcdesc, bool skipLastParameter) { Type typeFromTypeDesc = ComUtil.GetTypeFromTypeDesc(funcdesc.elemdescFunc.tdesc); ParameterInformation[] parameterInformation1 = ComUtil.GetParameterInformation(funcdesc, skipLastParameter); bool hasoptional = false; foreach (ParameterInformation parameterInformation2 in parameterInformation1) { if (parameterInformation2.isOptional) { hasoptional = true; break; } } return(new ComMethodInformation(false, hasoptional, parameterInformation1, typeFromTypeDesc)); }