Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get program code on button click in C#

Tags:

c#

.net

I have designed a windows form, in which I have placed 3 buttons and a richtextBox.
Now I want to get program code in richtextbox on different button click, that I have written in click() event of each button.

Example

private void button1_Click(object sender, ButtonEventArgs e)
{
       some code lines goes here   // 
       ....                        // All these lines to be displayed in richtextBox
       ....                        //
}
like image 311
Javed Akram Avatar asked Feb 19 '26 11:02

Javed Akram


1 Answers

I think you'd have to actually link-to and read the source files to do this. Once your application is compiled your C# code becomes IL code and does not look the same at all.

like image 126
Josh M. Avatar answered Feb 21 '26 01:02

Josh M.



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!