Re: Load an object reference onto the stack ???



Hi Barry

* I was examing your example, and these are my queries:-

* In your example, does the runtime IL code call an instance method of
class App ?

* And I do not exactly understand why you are using List<object>, which
will contain multiple objects in it.

* Why are you comparing

* In the statements
cg.Emit(OpCodes.Ldarg_0);
cg.Emit(OpCodes.Ldc_I4, index);
cg.Emit(OpCodes.Ldelem_Ref);
When you Ldelem_Ref, do you mean to say that the value loaded is the
'this' [ie the App's object reference].

* Summarizing my required in your example's terms
- App must create a dynamic method [it does using Dynamic
Method].
- The IL code in the dynamic method must call a instance
method, say CallBackMethod, of App. [I am not clear if it does].
And for calling the CallBackMethod, i need to load the
object reference of App, and call the method.

Bear with me for my ignorance, cuz i feel this one is complex and
pretty hard to debug where it fails.

Thanks Very Much
Vivek Ragunathan

.



Relevant Pages