摘要: 控制台生成九宫格(数独):[代码] 阅读全文
posted @ 2011-02-15 21:57 liumeibiao 阅读(1494) 评论(1) 推荐(0) 编辑
摘要: 控制台显示八皇后:[代码] 阅读全文
posted @ 2011-02-12 09:55 liumeibiao 阅读(245) 评论(0) 推荐(0) 编辑
摘要: namespace ExtendMethods{ public static class ExtendMethod { //定义string类型的扩展方法IsRight() public static bool IsRight(this string str) { switch (str.ToUpper().Trim()) { case "RIGHT": return true; case "YES": return true; case "OK": return true; default: return false; } } //定义int类型的扩展方法IsRight() public s 阅读全文
posted @ 2010-12-29 12:44 liumeibiao 阅读(164) 评论(0) 推荐(1) 编辑
摘要: int? x = 10;//用?修饰int,则该int允许存放null int? y = 12; if (x < y) x = y; System.Console.WriteLine(x);//12 y = x > y ? y : null;//条件运算符(?:)根据布尔型表达式的值返回两个值中的一个 System.Console.WriteLine(x);//null x = y ?... 阅读全文
posted @ 2010-12-03 22:33 liumeibiao 阅读(114) 评论(0) 推荐(0) 编辑
摘要: <head> <title></title> <meta http-equiv="x-ua-compatible" content="ie=7" /></head>以IE7兼容模式打开<body style="text-align: center;"> <center> </center></bo... 阅读全文
posted @ 2010-12-03 22:21 liumeibiao 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 主键:唯一标识 流水号--SQL注释格式It's 在SQL中表达: 'It''s'聚合函数:Sum()、Avg()、Max()、Min()、Count(*),共五个增删改查(CURD):Create,Update,Read,DeleteNOT ALL 同 NOT IN 同 NOT ANY_是一个匹配符,%可以是多个匹配符,[a,b]也是一个匹配符,但一定得是[]里面的其中一个值,即a或b,[^a... 阅读全文
posted @ 2010-12-03 22:12 liumeibiao 阅读(123) 评论(0) 推荐(0) 编辑
摘要: SQL2005.\SQLEXPRESS 本机SQL2005 VS2008float----------doublereal-----------floatint 32位smallint 16位bigint 64位moneysmallmoneybit位char定长 最大8000或max 单字节存储varchar单字节存储可变长度nchar定长 最大4000或max 双字节存储nvarchar双字节存... 阅读全文
posted @ 2010-12-03 22:05 liumeibiao 阅读(167) 评论(0) 推荐(0) 编辑
摘要: <head> <title>页面标题</title></head><body></body>页面主体<h1></h1>标题<p></p>段落<em></em>强调标记<a href="http://www.cnblogs.com/liumeibiao/">超链接</a>&copy;©&reg; ®<i></i>斜体字<b></b&g 阅读全文
posted @ 2010-12-03 21:57 liumeibiao 阅读(178) 评论(0) 推荐(0) 编辑
摘要: //四位数Console.Write("请输入1个四位数:");int sal5 = int.Parse(Console.ReadLine());int s1 = sal5 % 10;//个int s2 = (sal5 % 100) / 10;//十int s3 = (sal5 % 1000) / 100;//百int s4 = sal5 / 1000;//千Console.WriteLine("... 阅读全文
posted @ 2010-12-03 21:08 liumeibiao 阅读(396) 评论(0) 推荐(0) 编辑
摘要: 很多情况下,结构体可以看作是缩小的类,它更合适于把一些数据组合起来的场合,它与类的主要区别在于:  ①结构是值类型,而类是引用类型;  ②结构不支持继承;  ③编译器总是为结构提供一个无参数的默认构造函数,这是不允许替换的;  ④在结构中,可以指定属性(字段)如何在内存中布局。 阅读全文
posted @ 2010-11-28 16:25 liumeibiao 阅读(331) 评论(1) 推荐(0) 编辑