public override string ToString () {
StringBuilder sb = new StringBuilder ();
Type retType = ReturnType;
if (ShouldPrintFullName (retType))
sb.Append (retType.ToString ());
else
sb.Append (retType.Name);
sb.Append (" ");
sb.Append (Name);
#if NET_2_0 || BOOTSTRAP_NET_2_0
if (IsGenericMethod) {
Type[] gen_params = GetGenericArguments ();
sb.Append ("[");
for (int j = 0; j < gen_params.Length; j++) {
if (j > 0)
sb.Append (",");
sb.Append (gen_params [j].Name);
}
sb.Append ("]");
}
#endif
sb.Append ("(");
ParameterInfo[] p = GetParameters ();
for (int i = 0; i < p.Length; ++i) {
if (i > 0)
sb.Append (", ");
Type pt = p[i].ParameterType;
bool byref = pt.IsByRef;
if (byref)
pt = pt.GetElementType ();
if (ShouldPrintFullName (pt))
sb.Append (pt.ToString ());
else
sb.Append (pt.Name);
if (byref)
sb.Append (" ByRef");
}
if ((CallingConvention & CallingConventions.VarArgs) != 0) {
if (p.Length > 0)
sb.Append (", ");
sb.Append ("...");
}
sb.Append (")");
return sb.ToString ();
}