Possible Duplicate:
How are DLLs loaded by the CLR?
I have noticed a strange but reasonable behaviour of the CLR, and was wondering whether or not this is a documented behaviour.
I have a method that looks similar to this:
public void SomeStuff()
{
CreateDump();
Logger.Info(this, "Created dump");
}
I deleted the assembly that contains Logger class, and noticed that when SomeStuff is called, the assembly that contains Logger is attempted to be loaded.
I guess the CLR "plans ahead" a few instructions and tries to load the assembly beforehand?
When i refactored the call to Logger into a different method, it didn't demonstrate this behaviour.
Are there any rules on WHEN the actual assembly loading is attempted?