internal DynamicMethod DefineDynamicMethod(String methname, Type returntype, Type hostType) {
// We're claiming that these are static methods, but really they are instance methods.
// By giving them a parameter which represents "this", we're tricking them into
// being instance methods.
MethodAttributes attribs = MethodAttributes.Public | MethodAttributes.Static;
CallingConventions conventions = CallingConventions.Standard;
DynamicMethod dm = new DynamicMethod(methname, attribs, conventions, returntype, _paramTypes, hostType, false /*skipVisibility*/);
_ilg = dm.GetILGenerator();
return dm;
}