Assemblies and global methods

  • Thread starter Thread starter Abdessamad Belangour
  • Start date Start date
A

Abdessamad Belangour

Hi all, and thanks for previous answers (especially Nicholas Paldino)
An assembly is composed of a set of modules. The module class has a method
for reading global methods GetMethods(). My questions are :
1. Are we obliged to go down to modules for reading global methods?
2. What about the GetExportedTypes() method of an assembly class ?
3. Should we ignore global methods as we are C# users (not C++) and that we
are interested in metadata stored on assembly files not .exe ones ?
Thanks in advance.
Abdessamad.
 
Hi,
1. Are we obliged to go down to modules for reading global methods?

I think yes, since global methods are a feature available only in modules,
provided we don't mix up global and static methods.
2. What about the GetExportedTypes() method of an assembly class ?

This one will give you the list of all public types contained in an
assembly - that is, classes, enums, structs, delegates etc. Not sure this
includes modules.
3. Should we ignore global methods as we are C# users (not C++) and that we
are interested in metadata stored on assembly files not .exe ones ?

No we shouldn't. Modules are a part of the .NET Framework, not of the C++
language. And managed .exe files ARE assemblies, as well as .dll ones.
 
2. What about the GetExportedTypes() method of an assembly class ?
This one will give you the list of all public types contained in an
assembly - that is, classes, enums, structs, delegates etc. Not sure this
includes modules.

This includes all of the PUBLIC types in the assembly (and thus all of the
PUBLIC types in all of the modules), but it does not include private or
internal types.
 
Back
Top