internal static string ConstructParameters(Type[] parameters, CallingConventions callingConvention)
{
string toString = "";
string comma = "";
for(int i = 0; i < parameters.Length; i++)
{
Type t = parameters[i];
toString += comma;
toString += t.SigToString();
if (t.IsByRef)
{
toString = toString.TrimEnd(new char[] { '&' });
toString += " ByRef";
}
comma = ", ";
}
if ((callingConvention & CallingConventions.VarArgs) == CallingConventions.VarArgs)
{
toString += comma;
toString += "...";
}
return toString;
}