2015年3月23日

C#预处理指令

摘要: #define#undef#if#else#elif(else if 的简写)#endif定义和不定义(#define、#undef)必须加在最开头#define abc (要在所有非预处理指令的前面,包括命名空间)using System;using System.Collections.Gene... 阅读全文

posted @ 2015-03-23 13:19 wos1239 阅读(112) 评论(0) 推荐(0) 编辑

C#基本语句与C++区别

摘要: 条件语句必须为bool表达式int a = 1;if(a){ ...}在c++中可以,但c#报错但bool b = true;//不能写成b = 1了;if(b){ ...}是可以的,因为b本来就是bool型的switch 语句: 一个case语句如果非空,则必须用break或goto语句,即... 阅读全文

posted @ 2015-03-23 12:49 wos1239 阅读(120) 评论(0) 推荐(0) 编辑

C#枚举类型

摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace ConsoleApplication1{ class ... 阅读全文

posted @ 2015-03-23 11:55 wos1239 阅读(84) 评论(0) 推荐(0) 编辑

C#基本数据类型与C++区别

摘要: 与C++不同的地方:char占两个字节存Unicode字符,long long 改为 long ;unsize ... 改为 u...新增: byte占1个字节,类似与C++char, sbyte有符号的byte decimal 占16个字节,定点小数,28-29位有效数字和小数点位置,精度高... 阅读全文

posted @ 2015-03-23 11:49 wos1239 阅读(174) 评论(1) 推荐(0) 编辑

C#调试

摘要: 选择Debug模式F9设置断点//运行这一句之前停,然后再运行这一句F5运行F10逐过程执行F11逐语句执行//调用系统的函数还是会逐过程执行,无法进入函数内。在调试过程中可以通过局部变量窗口或用鼠标指向变量查看变量的值调试菜单最后一栏属性打开后选调试栏,在命令行参数中输入数据可以给args[]传值... 阅读全文

posted @ 2015-03-23 11:11 wos1239 阅读(168) 评论(0) 推荐(0) 编辑

C#holle world

摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace ConsoleApplication1{ class ... 阅读全文

posted @ 2015-03-23 10:31 wos1239 阅读(150) 评论(0) 推荐(0) 编辑

导航