1

Possible Duplicate:
How to get Namespace of an Assembly?

when i load a assembly how can i find its namespace suppose if i load a exam.dll how can i find its namespace

Community
  • 1
  • 1
Arunachalam
  • 5,417
  • 20
  • 52
  • 80
  • Google landed me here looking for a related question - get all types in a namespace via Reflection: http://stackoverflow.com/questions/79693/getting-all-types-in-a-namespace-via-reflection – Chris Moschini Jan 22 '13 at 22:40

1 Answers1

2

First off, an assembly can contain many namespaces. It's often that 1 assembly == 1 namespace, but this is not required at all.

To find the namespaces in the assembly, just get all of the types in the assembly. See Assembly.GetTypes for details as to how to do this.

From the type, you have the fully qualified type name, and the namespace of the type.

Reed Copsey
  • 554,122
  • 78
  • 1,158
  • 1,373