摘要: static void Main(string[] args) { int[] test = { 1,33,33,22,44}; Console.WriteLine(Add(test));//也可以这样传 Console.WriteLine(Add(1,2,4,5,6,7)); } //当一个方法中 阅读全文
posted @ 2014-12-28 22:27 kevin.dai 阅读(566) 评论(0) 推荐(0) 编辑
摘要: static void Main(string[] args) { int test = 100; int s;//申明变明来接收方法返回的值 Console.WriteLine(M1(test,out s));... 阅读全文
posted @ 2014-12-28 22:07 kevin.dai 阅读(312) 评论(0) 推荐(0) 编辑
摘要: class Program { static void Main(string[] args) { int test = 100; M1(ref test); //参数不加REF时,会直接输出100 加了REF会输... 阅读全文
posted @ 2014-12-28 21:55 kevin.dai 阅读(188) 评论(0) 推荐(0) 编辑
摘要: class Program { static void Main(string[] args) { DataBase dt = new Data(); dt.Add(); } } ... 阅读全文
posted @ 2014-12-28 16:37 kevin.dai 阅读(186) 评论(0) 推荐(0) 编辑