Title: RE: [Mono-list] Reflection

Yes. In fact mono's own C# compiler, mcs, uses reflection extensively.

Reflection has no concept of a 'namespace' as such. However you can query a Type for its namespace (as a string).

In order to enumerate all the namespaces of the loaded types you have to:
1) get the list of assemblies from the appdomain (AppDomain.CurrentDomain.GetAssemblies ())
2) get the list of types from the assemblies (assembly.GetTypes ())
3) build a set of namespaces from the individual types (type.Namespace)

Piers.

> -----Original Message-----
> From: Sanjaya Singharage [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 04, 2003 8:47 PM
> To: [EMAIL PROTECTED]
> Subject: [Mono-list] Reflection
>
>
> Hello,
> Is the System.Reflection class avaible in the current mono?
> Is there any tool that is provided with mono for discovering
> methods etc.? Can the Reflection class be used to discover
> classes in a given namespace? Can the Reflection class be
> used to discover all namespaces available? If not is there
> any other way to get this done? thanks.
>
>
> _______________________________________________
> Mono-list maillist  -  [EMAIL PROTECTED]
> http://lists.ximian.com/mailman/listinfo/mono-list
>

Reply via email to