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的朋友多多联系。

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