If one calls Assembly.Load
multiple times does it cause any side effects?
e.g.
for (int i = 0; i < N; i++)
{
Assembly.Load(assemblyStrongName);
// .......
}
This loads the assembly one time doesn't it? I've checked with AppDomain.CurrentDomain.GetAssemblies()
before and after and it seems it's loaded one time (as it should) but does it have side effects?
In a long running server application (runs for months/years with no restart) does the above cause any issues?
This loads the assembly one time doesn't it?
Yes. The assembly gets loaded into the current AppDomain, and will only be loaded once into that AppDomain. Calling this multiple times just returns the existing assembly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With