08 2012 档案

摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication2{ enum Day //枚举类型 { Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday } class Program { static void Main... 阅读全文
posted @ 2012-08-31 17:30 梦断难寻 阅读(15715) 评论(0) 推荐(0) 编辑
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication1{ class Program { static void Main(string[] args) { // 一个石头剪刀布的游戏,下面代码其实可以封装成函数或者过程,封装成函数或者过程会代码更简单,更清晰. 但是由于刚开始学C#,学到了面向对象的方法时再封装吧. Random Rd = new... 阅读全文
posted @ 2012-08-31 17:28 梦断难寻 阅读(4622) 评论(0) 推荐(0) 编辑
摘要:1 //建立一个控制台程序,把下面代码复制进去 Ctrl + F5运行 2 3 using System; 4 using System.Collections.Generic; 5 using System.Linq; 6 using System.Text; 7 8 namespace ConsoleApplication1 9 {10 class Program11 {12 static void Main(string[] args)13 {14 int[] my = new int[10]; //定义一个... 阅读全文
posted @ 2012-08-29 21:49 梦断难寻 阅读(706) 评论(0) 推荐(0) 编辑
摘要:代码清单 :using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication{ class Program { static void Main(string[] args) { //定义两个变量. int i = 23, j = 45; //输出 Console.WriteLine("{0} + {1} = {2... 阅读全文
posted @ 2012-08-24 23:22 梦断难寻 阅读(2781) 评论(0) 推荐(0) 编辑
摘要:1.数学运算符. 2.赋值运算符 3. 运算符的优先级 阅读全文
posted @ 2012-08-23 21:55 梦断难寻 阅读(466) 评论(0) 推荐(0) 编辑
摘要:1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 6 namespace OneCshapApplication 7 { 8 class Program 9 {10 static void Main(string[] args)11 {12 //定义几个变量,13 int age; //整形14 string Name; //字... 阅读全文
posted @ 2012-08-23 21:45 梦断难寻 阅读(406) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示