George,

It isn't really possible to find an assembly name
from a namespace since the same namespace may be
split across multiple assemblies. Take the "System"
namespace as a classic example.

What you can do is find the assembly name from a class
name, that might get you to where you want to go.

        using FindAsm;
        using System;
        using System.Reflection;

        namespace FindAsm
        {

                public class EntryPoint
                {

                        public static void Main()
                        {

                                // Declare locals.
                                Type seedType = null;

                                // Grab get a type reference from the
hardcoded
                                // string then output the display name
to the screen.
                                seedType =
Type.GetType("System.Convert");

Console.WriteLine(seedType.Assembly.ToString());

                        }

                }

        }

Note that this will only work if the assembly has
been loaded in by the application domain in the first
place, otherwise you will need to do a bit of heavy
lifting to search a given set of assemblies.

----------------------------------------
- Mitch Denny
- [EMAIL PROTECTED]
- +61 (414) 610-141
-

-----Original Message-----
From: The DOTNET list will be retired 7/1/02
[mailto:[EMAIL PROTECTED]] On Behalf Of george antony
Sent: Tuesday, 18 June 2002 21:48
To: [EMAIL PROTECTED]
Subject: [DOTNET] Urgent pls -finding the assembly name from namespace


hi all
can any one tell me how to find a assembly name from a namespace

regards
gan

__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com

You can read messages from the DOTNET archive, unsubscribe from DOTNET,
or subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to