System.IO.Path.GetExtension(Assembly.GetModules()[0].FullyQualifiedName)
would work similarly.

>From a practical perspective, I'm not sure there's much difference between
an EXE assembly and a DLL assembly, except that the EXE contains a shim to
kick off the .Net core and start the EXE's Main() function. Out of
curiousity, why do you need to know?

On 1/4/06, David Lanouette <[EMAIL PROTECTED]> wrote:
>
> I doubt that this is the best way, but...
>
>         if (Assembly.GetExecutingAssembly().Location.EndsWith(".dll"))
>             Console.WriteLine("Dll");
>         else
>             Console.WriteLine("exe");
>
>
>
>
>
> On 1/4/06, Jekke Bladt <[EMAIL PROTECTED]> wrote:
> > All--
> >
> > Is there a straightforward way to determine from an Assembly object
> > whether it is an executable or a library?
> >
> > TIA
> >
> > --Jekke
> >
> > ===================================
> > This list is hosted by DevelopMentor(r)  http://www.develop.com
> >
> > View archives and manage your subscription(s) at
> http://discuss.develop.com
> >
>
>
> --
> ______________________________
> - David Lanouette
> - [EMAIL PROTECTED]
>
> ===================================
> This list is hosted by DevelopMentor(r)  http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com
>



--
Eric Means
[EMAIL PROTECTED]
http://www.randomtree.org/eric/

===================================
This list is hosted by DevelopMentor®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to