fun.cs
using System; using System.Collections.Generic; using System.Text; namespace _2008N2 { class fun { public string getABC() { return "ABC"; } public static string getNum() { return "123"; } } }
然后在程序中调用,从调用的方法上可以看到区别
private void test() { string a = fun.getNum(); fun f = new fun(); string t= f.getABC(); }