代码改变世界

阅读排行榜

C# 程序的通用结构(命名空间下组成)

2012-08-03 15:29 by 墨泣, 142 阅读, 收藏,
摘要: 来源:http://msdn.microsoft.com/zh-cn/library/w2a9a9s3 // A skeleton of a C# program using System; namespace YourNamespace { class YourClass { } struct YourStruct ... 阅读全文

一、数组元素不定时,定义数组

2012-08-03 16:12 by 墨泣, 130 阅读, 收藏,
摘要: int[] array3; array3 = new int[] { 1, 3, 5, 7, 9 }; // OK //array3 = {1, 3, 5, 7, 9}; // Error 二、多维数组 int[,] array = new int[4, 2]; 四行两列的二维数组 int[,] array2Da = new int[4, 2] { { 1, 2 }, {... 阅读全文

数据库问题

2011-07-18 11:41 by 墨泣, 127 阅读, 收藏,
摘要: 一、数据库名:easeland 二、在数据库属性》文件,有数据库文件列表:有两列:逻辑名称和文件名;文件名是指在windows资源管理器中可以看到的数据库文件的名称;逻辑名称是指 三、数据库改名的方法 ALTER DATABASE 原数据库名 MODIFY NAME='新数据库名'四、更改数据库逻辑文件名的方法alter database 数据库名modify file(name='原逻辑文件名'... 阅读全文

ASP.NET 中的正则表达式

2011-07-20 12:28 by 墨泣, 113 阅读, 收藏,
摘要: 速成课程 Steven A. Smith 适用范围: Microsoft® .NET Framework Microsoft® ASP.NET 正则表达式 API 摘要:正则表达式是一种处理文本的有用工具。无论是验证用户输入、搜索字符串内的模式、还是以各种有效方式重新设置文本格式,正则表达式都非常有用。 下载本文的源代码。 本页内容 引言 正则表达式使用历史简介 简单表达式 限定符 元字符 字符类... 阅读全文

正则表达式

2011-08-11 10:54 by 墨泣, 107 阅读, 收藏,
摘要: private void txtA_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e) { if (!System.Text.RegularExpressions.Regex.IsMatch(e.KeyChar.ToString(),"[0-9]")) { e.Handled = true; return; } } 阅读全文