Assembly initialization

  • Thread starter Thread starter Bob Altman
  • Start date Start date
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
 
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.
 
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
 
Back
Top