dynamically loading objects from assemblies

  • Thread starter Thread starter z f
  • Start date Start date
Z

z f

i need to dynamically load a type from an assembly.
i looked at CreateInstanceFromAndUnwrap and it seems to do the work.
is this function will perform good under load?
like when the same assembly will be asked to be loaded manyn times, will the
function identify that the assembly is already loaded ot it will do the
whole process again and again?
what should bring the results as if the assembly be referenced directly?

TIA!
 
z said:
i need to dynamically load a type from an assembly.
i looked at CreateInstanceFromAndUnwrap and it seems to do the work.
is this function will perform good under load?
like when the same assembly will be asked to be loaded manyn times, will the
function identify that the assembly is already loaded ot it will do the
whole process again and again?
what should bring the results as if the assembly be referenced directly?

TIA!
 
I would use Assembly.CreateInstance(). CreateINstanceFromAndUnwrap is
for when you want to create an object in a particular AppDomain - which
you don't need to do.

If you hand onto the Assembly object the performance should be fine.
 
Back
Top