Re: Can you detect when your assembly is loaded?
- From: "David Levine" <noSpam12dlevineNNTP2@xxxxxxxxx>
- Date: Mon, 18 Jul 2005 19:19:58 -0500
You can use a static class constructor. The first time your class is used
the static ctor will be invoked before any of the instance methods or fields
can be accessed.
"Jeff Lar" <JeffLar@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4BE69F9C-DF78-4294-A81A-0C9A1189FDC7@xxxxxxxxxxxxxxxx
>
> I'm writing a class library that will be consumed by other applications,
> both web and form, and may also be loaded dynamically. I need the assembly
> to
> perform some validation immediately after it is loaded, and possibly shut
> itself down. I cannot find an event or mechanism to detect when my
> assembly
> is loaded. Any suggestions?
.
- References:
- Can you detect when your assembly is loaded?
- From: Jeff Lar
- Can you detect when your assembly is loaded?
- Prev by Date: Re: Can you detect when your assembly is loaded?
- Next by Date: How can Microsoft MSM's can be extracted to multiple locations
- Previous by thread: Re: Can you detect when your assembly is loaded?
- Next by thread: Quickstart connection problem
- Index(es):