3 개의 버튼과 richtextBox를 배치 한 Windows 양식을 설계했습니다.
지금은 richtextbox에서 프로그램 코드를 얻고 싶습니다. 각 버튼의 click() 이벤트에서 작성한 다른 버튼을 클릭하십시오.C에서 버튼 클릭시 프로그램 코드 가져 오기
예
private void button1_Click(object sender, ButtonEventArgs e)
{
some code lines goes here //
.... // All these lines to be displayed in richtextBox
.... //
}
원본을 인쇄하려면 프로그램을 원하십니까? 버튼을 클릭하면? –
@ 0A0D : 네, 맞습니다. –
이것을 quine이라고합니다. 여기를 참조하십시오 : http://stackoverflow.com/questions/753467/the-shortest-program-that-prints-its-own-source-code-in-c –