Assemblies and global methods

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Abdessamad Belangour

    #1

    Assemblies and global methods

    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 GetExportedType s() 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.


  • Dmitriy Lapshin [C# / .NET MVP]

    #2
    Re: Assemblies and global methods

    Hi,
    [color=blue]
    > 1. Are we obliged to go down to modules for reading global methods?[/color]

    I think yes, since global methods are a feature available only in modules,
    provided we don't mix up global and static methods.
    [color=blue]
    > 2. What about the GetExportedType s() method of an assembly class ?[/color]

    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.
    [color=blue]
    > 3. Should we ignore global methods as we are C# users (not C++) and that[/color]
    we[color=blue]
    > are interested in metadata stored on assembly files not .exe ones ?[/color]

    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.

    --
    Dmitriy Lapshin [C# / .NET MVP]
    X-Unity Test Studio

    Bring the power of unit testing to VS .NET IDE

    "Abdessamad Belangour" <belangour@irin .univ-nantes.fr> wrote in message
    news:erLFFRXuDH A.2448@TK2MSFTN GP12.phx.gbl...[color=blue]
    > 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 GetExportedType s() method of an assembly class ?
    > 3. Should we ignore global methods as we are C# users (not C++) and that[/color]
    we[color=blue]
    > are interested in metadata stored on assembly files not .exe ones ?
    > Thanks in advance.
    > Abdessamad.
    >
    >[/color]

    Comment

    • Grant Richins [MS]

      #3
      Re: Assemblies and global methods

      > > 2. What about the GetExportedType s() method of an assembly class ?[color=blue]
      >
      > 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.[/color]

      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.

      --
      --Grant
      This posting is provided "AS IS" with no warranties, and confers no rights.


      Comment

      Working...