Vararg (variable arguments) methods accept argument lists of unknown length and type. CLR supports this by the IL instruction (arglist) and other BCL types, such as System.ArgIterator. C# compiler has undocumented keyword "__arglist" to support defining vararg methods, accessing variable arguments and calling them, as shown below.
Two MemberRef tokens are needed to specify each vararg method call site. The blob each MemberRef points to specifies the methodref signature: types of both fixed and variable arguments.
ILGenerator.EmitCall(OpCode opcode, MethodInfo methodInfo, Type optionalParameterTypes) is designed for emitting call to such vararg method (for both Reflection.Emit and dynamic method scenarios). The optionalParameterTypes argument is passed in to create different MethodRef tokens.
Assume the MethodInfo of "VarargMethod" is miVarargMethod, the following code creates a DynamicMethod to perform the same functionality as previous "CallVarargMethod" does:
As you see in the attached C# code (which uses ILGenerator.EmitCall for both Reflection.Emit and DynamicMethod), Type.GetMethod (and other APIs) can return MethodInfo of vararg methods; however MethodInfo.Invoke currently does not support to invoke on them. It is easy to get around with this: just create a dynamic method, and use EmitCall, and invoke on the dynamic method.
Although EmitCall can be used to emit a call to non-vararg method, you are encouraged to use ILGenerator.Emit(OpCode, MethodInfo) for that scenario, and use EmitCall mainly for vararg methods. With that said, the naming of this API does sound somewhat misleading.