-1

In C# we have __arglist keyword which makes method variable-argument like this:

public static void PrintFormat(string format, __arglist) 
{
    ....
}

It compiles to :

.method public hidebysig static vararg void PrintFormat ( string format ) cil managed 
{
    ....
} 

Note that vararg. So how can we know a method has variable-arguments in Mono.Cecil ?

moien
  • 999
  • 11
  • 26

1 Answers1

0

@JeroenMostert pointed that out. Source.

public static bool IsVarArg (this IMethodSignature self)
{
    return (self.CallingConvention & MethodCallingConvention.VarArg) != 0;
}
moien
  • 999
  • 11
  • 26