Linux 下采用開源MONO第一個C#程序

C#是微軟的項目。雖然在Windows下限制頗多,但是到了Linux下卻是開源的,希望大家看看奇妙的程序吧。

1、引用


using System;
using Gtk;
using System.IO;

2、按鈕事件代碼


protected void OnButton2Clicked (object sender, System.EventArgs e)
	{
	    //throw new System.NotImplementedException ();
	    StreamWriter sw=new StreamWriter("Test.txt");
            sw.Write(textview2.Buffer.Text); 
            textview2.Buffer.Text="Saved to file !"; 
            sw.Close(); 
	}

希望研究類似開源MONO的朋友多多聯繫。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章