System.Reflection questions

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

    #1

    System.Reflection questions

    Hi,
    I have two questions about Reflection. One I think I know the answer
    to but will ask anyway.

    1) I can delve into a component or executable and get all the way to
    the method within a class. But I can't see the code inside the method.
    Is there a way to get access to that?

    2) This may be a dumb question but I'll ask. Is there anyway to use
    Reflection with a VB6 dll or exe?

  • Kevin Spencer

    #2
    Re: System.Reflecti on questions

    Hi Douig,
    [color=blue]
    > 1) I can delve into a component or executable and get all the way to
    > the method within a class. But I can't see the code inside the method.
    > Is there a way to get access to that?[/color]

    Nope.
    [color=blue]
    > 2) This may be a dumb question but I'll ask. Is there anyway to use
    > Reflection with a VB6 dll or exe?[/color]

    Nope.

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    You can lead a fish to a bicycle,
    but you can't make it stink.

    "Doug" <dnlwhite@dtgne t.com> wrote in message
    news:1134149509 .239526.45620@g 43g2000cwa.goog legroups.com...[color=blue]
    > Hi,
    > I have two questions about Reflection. One I think I know the answer
    > to but will ask anyway.
    >
    > 1) I can delve into a component or executable and get all the way to
    > the method within a class. But I can't see the code inside the method.
    > Is there a way to get access to that?
    >
    > 2) This may be a dumb question but I'll ask. Is there anyway to use
    > Reflection with a VB6 dll or exe?
    >[/color]


    Comment

    • Mattias Sjögren

      #3
      Re: System.Reflecti on questions

      >1) I can delve into a component or executable and get all the way to[color=blue]
      >the method within a class. But I can't see the code inside the method.
      > Is there a way to get access to that?[/color]

      In v2.0 of the framework you can, using the new
      MethodBase.GetM ethodBody method.

      [color=blue]
      >2) This may be a dumb question but I'll ask. Is there anyway to use
      >Reflection with a VB6 dll or exe?[/color]

      If you want to reflect on a VB6 binary, then no you can't do that.
      Reflection requires metadata only available in managed executables.

      If you want to use Reflection from VB6, I guess that would be possible
      through COM interop.


      Mattias

      --
      Mattias Sjögren [C# MVP] mattias @ mvps.org
      http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
      Please reply only to the newsgroup.

      Comment

      Working...