na....it was for an example app. I wanted a way to load the
executing
code into a textbox to show the user what was happening for
each button
click. I know....a waste of time
Message from Chris Anderson <Chris ACTIVEIDE.COM> DISCUSS.DEVELOP.COM
received on 07/20/2006 04:03 PM
07/20/2006 04:03 PM
Chris Anderson <Chris ACTIVEIDE.COM> DISCUSS.DEVELOP.COM
Please respond to Discussion forum for developers using
Windows Forms to
build apps and controls <DOTNET-WINFORMS DISCUSS.DEVELOP.COM>
Sent by Discussion forum for developers using Windows Forms
to build apps
and controls <DOTNET-WINFORMS DISCUSS.DEVELOP.COM>
To: DOTNET-WINFORMS DISCUSS.DEVELOP.COM
cc:
Subject: Re: [DOTNET-WINFORMS] putting
current executing code in a textbox
All you will *ever* get is the IL and information about
loaded types,
etc
To actually get code you will then have to decompile this IL
to the
language of your choice..but even then if you have compiled
in Release
mode the code you get will not necessarily reflect the
original source
code (if you can decompile it to C#/VB at all). Even if it
did,
variable names will be lost, etc
With all this in mind, your efforts will probably not give
you the
results you are after.
What do you actually need it for?
Is it just a debugging tool? If so, what's wrong with
attaching a
debugger at the appropriate point?
> -----Original Message-----
> From: Discussion forum for developers using Windows
Forms to
> build apps and controls
> [mailto OTNET-WI
NFORMS DISCUSS.DEVELOP.COM] On Behalf Of
> Franklin Gray
> Sent: 20 July 2006 21:00
> To: DOTNET-WINFORMS DISCUSS.DEVELOP.COM
> Subject: Re: [DOTNET-WINFORMS] putting current
executing code
> in a textbox
>
> ha ha ha. There is a methodinfo object that has the
> information about the current executing method....I
just
> don't know how to use it to get the code.
>
>
|