internal GenericParam GetGenericParam(MethodDef meth) { Contract.Requires(meth != null); if (gPar == null) { if (isClassPar) { ClassDef methClass = (ClassDef)meth.GetParent(); gPar = methClass.GetGenericParam((int)index); } else { gPar = meth.GetGenericParam((int)index); } } return(gPar); }