文章分类 -  c#相关技术

c#相关技术
浅谈C#中参数ref和out
摘要:例子如下:我们定义一个a函数传递两个参数x和y里面进行乘法运算,X和Y都进行乘2,因为定义的void没有返回值的函数,所以不会有返回值。static void a(int x,int y){ x=x*2; y=y*2;}现在定义主函数b来调用a函数看然后看下x和y的值会不会改变,static void b(strubg[] args){ int TempNum_1=20; int TempNum_2=40; a(TempNum_1,TempNum_2); Console.WriteLine(TempNum_1); Console.WriteLine(TempNum_2);}这时候... 阅读全文

posted @ 2013-01-29 21:58 PLAY_NET 阅读(79) 评论(0) 推荐(0)

Swtich三元运算符
摘要:今天照着视频写的代码 保存下。不动手还真不知道 很多得多写才可以的啊。View Code using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication2{ class Program { static void Main(string[] args) { //多分支选择结构 int week=1; string weekstring... 阅读全文

posted @ 2013-01-24 19:22 PLAY_NET 阅读(99) 评论(0) 推荐(0)

开始学习c#的点点滴滴,记录我的点点滴滴
摘要:每天写一实例。坚持。。 阅读全文

posted @ 2013-01-24 16:52 PLAY_NET 阅读(49) 评论(0) 推荐(0)

导航