摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 枚举{ class Program { // 枚举类型是一种的值类型,它用于声明一组命名的常数。 // 枚举的声明:枚举声明用于声明新的枚举类型。 // 访问修辞符 enum 枚举名:基础类型 // { // 枚举成员 // } // 枚举可用来存储字符串与数字的值对,相当于一个对照表 ... 阅读全文
posted @ 2012-08-13 21:57 W4tch3r 阅读(111) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace 类型转换{ class Program { static void Main(string[] args) { Console.WriteLine("int最大值{0},最小值{1}",int.MaxValue,int.MinValue); Console.WriteLine("byte最大值{0},最小值... 阅读全文
posted @ 2012-08-13 21:14 W4tch3r 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 6 namespace ConsoleApplication1 7 { 8 class Program 9 { 10 static void Main(string[] args) 11 { 12 13 14 15 //练习 16 Console.WriteLine("请输入帐号");... 阅读全文
posted @ 2012-08-08 21:40 W4tch3r 阅读(135) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication1{ class Program { static void Main(string[] args) { //字符串,整型的输入和输出 Console.WriteLine("Hello!"); string name = Console.ReadLin... 阅读全文
posted @ 2012-08-07 22:30 W4tch3r 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 常用的转义字符及其含义:\’ 单引号\” 双引号\\ 反斜杠\0 空\a 警告(产生峰鸣)\b 退格\f 换页\n 换行\r 回车\t 水平制表符\v 垂直制表符C#转义字符:·一种特殊的字符常量;·以反斜线"\"开头,后跟一个或几个字符。·具有特定的含义,不同于字符原有的意义,故称“转义”字符。·主要用来表示那些用一般字符不便于表示的控制代码。 ·它的作用是消除紧随其后的字符的原有含义·用一些普通字符的组合来代替一些特殊字符,由于其组合改变了原来字符表示的含义,因此称为“转义” ·用可以看见的字符表示那 阅读全文
posted @ 2012-08-06 22:00 W4tch3r 阅读(186) 评论(0) 推荐(0) 编辑