Q:

Which CallingConventions to use with Reflection.Emit?

This introductory guide here says you can use CallingConventions.Standard for basically anything: https://www.codeproject.com/Articles/13337/Introduction-to-Creating-Dynamic-Types-with-Reflec
On the other hand, MSDN states this for CallingConventions.Standard:

Specifies the default calling convention as determined by the common language runtime. Use this calling convention for static methods. For instance or virtual methods use HasThis.

https://msdn.microsoft.com/en-us/library/system.reflection.callingconventions
So, I assume I should listen to MSDN and only use Standard for static methods. But how come it works for instance methods? What's the difference?
Edit:
Here's some more info from experimentation:

Constructors generated with either HasThis or Standard seem to always produce methods that reflect to Standard.
Instance methods generated with HasThis reflect to HasThis and those generated with Standard reflect to Standard|HasThis.
Instance methods defined by "static" code compilation reflect to Standard|HasThis.

So the conclusion is I should probably always use Standard after all? Still don't see any difference, to be honest, since both ways work.

A:

Use Standard when defining a static method.
Use Standard | HasThis when defining an instance method.
Standard basically tells .NET to use CLR Fastcall, and HasThis tells the compiler to pass a hidden this* in the first parameter.

