MethodInfo[] GetMethodsFromGTDWithHint (BindingFlags hint)
{
TypeBuilder tb = generic_type as TypeBuilder;
if (tb == null)
return generic_type.GetMethods (hint);
if (tb.num_methods == 0)
return new MethodInfo [0];
MethodInfo[] res = new MethodInfo [tb.num_methods];
Array.Copy (tb.methods, 0, res, 0, tb.num_methods);
return res;
}