You can do both.
If you load the assembly to the same appdomain as your main assembly then
there is no need for marshalling across any appdomain boundary so calls to
the assembly are faster. However, serious errors in the assembly could bring
down the app domain and therefore your app too, also, if you only want the
assembly loaded for a specific task, you wont be able to unload it to free
memory inside you app domain.
If you load the assembly to a different appdomain to your main assembly, the
framework will need to marshall calls across the app domain boundary and this
will make invocation of the call slower, you will however be able to unload
the appdomain and free the ram when you want and serious exceptions in the
app domain will/should not be able to teardown your app.
It depends on what the assembly is used for and how its interface is design.
HTH
Ciaran O'Donnell
"chandu" wrote:
hello ,
i want to load and execute an existing dll in a applicaiton dynamically with
out giving references etc...
need to create separate appdomain or in same appdomain can i load and
execute the assembly dynamically..........
please give me some idea..
thak u