Emisión de llamada de función de delegado
Tengo el siguiente código C #:
public static double f2(Func<double, double> f, double x)
{
return f(x);
}
Y aquí está el código IL:
.method public hidebysig static
float64 f2 (
class [mscorlib]System.Func`2<float64, float64> f,
float64 x
) cil managed
{
// Method begins at RVA 0x20bd
// Code size 8 (0x8)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldarg.1
IL_0002: callvirt instance !1 class [mscorlib]System.Func`2<float64, float64>::Invoke(!0)
IL_0007: ret
}
Como puedo emitir
callvirt instance !1 class [mscorlib]System.Func`2<float64, float64>::Invoke(!0)
instalación a través de laSystem.Reflection.Emit o mejor a través delMono.cecil?
¿Qué! 1 y! 0 son las siglas?