A
Atul Godbole
Suppose an assembly "Main" is using class "A" from another Assembly "Dep" as
follows :
A a = new A();
a.MethodOne();
At what time is the call to MethodOne linked to the actual MSIL (method
body) of the method? Does this occur when "Main" is build or does it happen
when main is loaded and Jitted? Also is the linking achieved by the full
method name( this is what is seen in the IL generated by ILDASM : e.g : call
System.String.ctor() ) or is it linked using a fixed number ( say its
ordinal in the class function table).
The reason I am asking this is what will happen if I add another method
"MethodTwo" to class "A" without changing the version of the assembly "Dep".
Will the "Main" assembly continue to run without the need to recompile?
If so, this should suggest that at least some part of the linking is done
during load-time.
Any explanations, doc references, online article references would be
appreciated.
Regards
Atul
follows :
A a = new A();
a.MethodOne();
At what time is the call to MethodOne linked to the actual MSIL (method
body) of the method? Does this occur when "Main" is build or does it happen
when main is loaded and Jitted? Also is the linking achieved by the full
method name( this is what is seen in the IL generated by ILDASM : e.g : call
System.String.ctor() ) or is it linked using a fixed number ( say its
ordinal in the class function table).
The reason I am asking this is what will happen if I add another method
"MethodTwo" to class "A" without changing the version of the assembly "Dep".
Will the "Main" assembly continue to run without the need to recompile?
If so, this should suggest that at least some part of the linking is done
during load-time.
Any explanations, doc references, online article references would be
appreciated.
Regards
Atul