static void FormatElementType (TypeReference tr, StringBuilder builder)
{
var ts = tr as TypeSpecification;
if (ts != null) {
if (ts.IsByReference) {
FormatElementType (ts.ElementType, builder);
builder.Append ("&");
return;
}
var array = ts as ArrayType;
if (array != null) {
FormatElementType (ts.ElementType, builder);
builder.Append ("[");
for (int ii = 0; ii < array.Rank - 1; ++ii) {
builder.Append (",");
}
builder.Append ("]");
return;
}
}
FormatName (tr, builder, '+');
}
}