469,358 Members | 1,639 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,358 developers. It's quick & easy.

Initialization procedure of Assembly

Hi

Is their a way to perform something when an assembly is loaded the first
time? I would like to register some classes after I have (dynamicly) loaded
an assembly.

kind regards

Alexander
Nov 16 '05 #1
4 3519
maybe this will help...

http://msdn.microsoft.com/library/de...yloadtopic.asp
"Alexander Muylaert" <Re********@pandora.be> wrote in message
news:%2******************@TK2MSFTNGP11.phx.gbl...
Hi

Is their a way to perform something when an assembly is loaded the first
time? I would like to register some classes after I have (dynamicly)
loaded an assembly.

kind regards

Alexander

Nov 16 '05 #2
Ideal would be if I could use the static constructor.

When I load an assembly, is this constructor called for each class or is
this done when I access the class for the first time?

kind regards

Alexander
"Alexander Muylaert" <Re********@pandora.be> wrote in message
news:%2******************@TK2MSFTNGP11.phx.gbl...
Hi

Is their a way to perform something when an assembly is loaded the first
time? I would like to register some classes after I have (dynamicly)
loaded an assembly.

kind regards

Alexander

Nov 16 '05 #3
Hi

Thanks,

but this event is called inside the application. I would like to have
something called inside the assembly.

kind regards
"Ashish Das" <yh****@hotmail.com> wrote in message
news:uh**************@TK2MSFTNGP14.phx.gbl...
maybe this will help...

http://msdn.microsoft.com/library/de...yloadtopic.asp
"Alexander Muylaert" <Re********@pandora.be> wrote in message
news:%2******************@TK2MSFTNGP11.phx.gbl...
Hi

Is their a way to perform something when an assembly is loaded the first
time? I would like to register some classes after I have (dynamicly)
loaded an assembly.

kind regards

Alexander


Nov 16 '05 #4
Alexander Muylaert wrote:
Hi

Is their a way to perform something when an assembly is loaded the first
time? I would like to register some classes after I have (dynamicly) loaded
an assembly.

kind regards

Alexander


If that would be possible, every assembly would be able to run some code
automatically at load-time. I'd rather stay in control of my app.
As you are loading the assembly dynamically, it should not be too
difficult to call on a static method (through reflection) to do some
assembly related initialization.
The previous proposal isn't that bad either.

Cheers,
Benoit
Nov 16 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by DaKoadMunky | last post: by
6 posts views Thread by Srini | last post: by
reply views Thread by Russ Barrett | last post: by
8 posts views Thread by R.A.M. | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.