3
我设计了一个windows窗体,其中我放置了3个按钮和一个richtextBox。
现在我想获取程序代码在richtextbox上点击不同的按钮,即我在每个按钮的click()事件中写入的。获取C#中按钮单击的程序代码
例
private void button1_Click(object sender, ButtonEventArgs e)
{
some code lines goes here //
.... // All these lines to be displayed in richtextBox
.... //
}
你想让你的程序打印出源代码,对吗?当你点击一个按钮? – 2011-03-10 01:27:40
@ 0A0D:是的,你是对的。 – 2011-03-10 01:29:05
这被称为奎因。看到这里:http://stackoverflow.com/questions/753467/the-shortest-program-that-prints-its-own-source-code-in-c – 2011-03-10 01:30:31