摘要: //主程序class Program { static void Main(string[] args) { while (true) { Console.WriteLine("请录入动物名称... 阅读全文
posted @ 2015-05-29 22:24 ronger918 阅读(153) 评论(0) 推荐(0) 编辑
摘要: class Program { public static object obj = new object(); public static int n = 10; static void Main(string[] args) {... 阅读全文
posted @ 2015-05-28 21:39 ronger918 阅读(167) 评论(0) 推荐(0) 编辑
摘要: class Program { static void Main(string[] args) { //选择排序 int[] a = new int[5] { 111, 12, 223, 854, -5655 };//初... 阅读全文
posted @ 2015-05-27 23:53 ronger918 阅读(90) 评论(0) 推荐(0) 编辑
摘要: Internet URL:http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&=]*)?Internet 电子邮件地址:\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*中华人民共和国电话号码:(\d3|\d{3}-)?\d{8}中华... 阅读全文
posted @ 2015-05-25 21:56 ronger918 阅读(94) 评论(0) 推荐(0) 编辑
摘要: //以上为运行结果//以下为借助Button按键完成的static class Program { /// /// 应用程序的主入口点。 /// [STAThread] static void Main() ... 阅读全文
posted @ 2015-05-22 00:39 ronger918 阅读(116) 评论(0) 推荐(0) 编辑
摘要: namespace 简单的英汉翻译程序{//调用端class Program { static void Main(string[] args) {//创建对象 Dic d = new Dic(); //添加元素 ... 阅读全文
posted @ 2015-05-21 00:09 ronger918 阅读(267) 评论(0) 推荐(0) 编辑
摘要: //定义委托public delegate void QuestionEventHandler(string s);//定义发布者public class Publisher{public string Question = "太平洋的中间是什么?";public event QuestionEve... 阅读全文
posted @ 2015-05-19 17:17 ronger918 阅读(101) 评论(0) 推荐(0) 编辑
摘要: namespace MinZheng{class Program{static void Main(string[] args){//创建对象1,赋值Person person = new Person("张三",25,XingBie.男,false,null);//创建对象2,赋值Person p... 阅读全文
posted @ 2015-05-13 18:32 ronger918 阅读(173) 评论(0) 推荐(0) 编辑
摘要: class Program{static void Main(string[] args){//定义一个一维数组int[] arr = {98,1,6,20,16,9};//判断是否发生交换bool b = false;for (int i = 0; i arr[j + 1]){//如果成立则发生... 阅读全文
posted @ 2015-05-11 20:40 ronger918 阅读(907) 评论(0) 推荐(0) 编辑
摘要: /*圆周率计算公式:4*(1-1/3+1/5-1/7+1/9-1/11+......),当1/n 0.0000001)//给出停止条件{//Math.Pow 数学方法x的n次方re += Math.Pow(-1,n-1) / ( 2 * n - 1);n++;}Console.WriteLine(... 阅读全文
posted @ 2015-05-11 20:21 ronger918 阅读(451) 评论(0) 推荐(0) 编辑