Assembly initialization

B

Bob Altman

Hi all,

Is there a way to tell .Net to run some code when an assembly is initially
loaded? I have a dll that wants to set up some shared members before any
classes are actually instantiated out of it.

TIA,

- Bob
 
B

Bob Altman

Hi Peter,

It's not clear how that could work for me. I am writing a DLL that wants to
guarantee that it initializes itself. I don't control the calling program,
which is where the AppDomain.AssemblyLoad event would need to be handled.
 
B

Bob Altman

Never mind... I think I'm trying to ask .Net to do something that doesn't
really make sense. I'll just do my initialization in the static (Shared in
VB) constructor of the class that needs to be initialized.

- Bob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top