List Info

Thread: putting current executing code in a textbox




putting current executing code in a textbox
user name
2006-07-21 22:02:58
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 <ChrisACTIVEIDE.COM>DISCUSS.DEVELOP.COM
received on 07/20/2006 04:03 PM

07/20/2006 04:03 PM



Chris Anderson <ChrisACTIVEIDE.COM>DISCUSS.DEVELOP.COM

Please respond to Discussion forum for developers using
Windows Forms to
build apps              and controls <DOTNET-WINFORMSDISCUSS.DEVELOP.COM>
Sent by Discussion forum for developers using Windows Forms
to build apps
           and controls <DOTNET-WINFORMSDISCUSS.DEVELOP.COM>



        To:     DOTNET-WINFORMSDISCUSS.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
> [mailtoOTNET-WI
NFORMSDISCUSS.DEVELOP.COM] On Behalf Of
> Franklin Gray
> Sent: 20 July 2006 21:00
> To: DOTNET-WINFORMSDISCUSS.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.
>
>
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )