[Mono-list] Doubt in Reflection.Emit
Miguel de Icaza
miguel@ximian.com
Wed, 10 Mar 2004 10:14:19 -0500
Hello,
> I have doubt in Reflection.Emit.Opcodes.
> I have noticed that before setting a variable , or
> calling a function
> Opcodes.ldarg_0 is always emitted.
> I want to know if ldarg_0 contains a reference to
> current object(something like "this" pointer) ::
> The example i came accross is as follows ( i have
> marked the lines which do this )::
In instance methods, the first argument is the pointer to the object
instance, so yes, the ldarg_0 is a way of loading the "this" pointer.
In static methods, it is the first argument to the method.
Miguel