Fork me on GitHub
摘要: 字母:数字单个数字\d非数字\D字符边界 \b任意字符 .字符点 \.或[abc]:匹配 a 或b 或c 都能匹配重复多次 c{2} 匹配两个c重复多次(范围) b{2,3} 匹配重复2到3次b重复多次(0-多次) b* 匹配 0个到多个b重复多次(1-多次) b+ 匹配 1个到多个b匹配单个 ... 阅读全文
posted @ 2015-06-05 16:41 乔闻 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 在编译之前进行的处理。预处理命令以符号“#”开头。#define 只能定义符号 不能定义宏(#define PI 3.14 这是错的,在c#中没宏)#region #endregion#if #end if#define MyDebug#undef MyDebug#define MyTrace#if... 阅读全文
posted @ 2015-06-05 14:36 乔闻 阅读(234) 评论(0) 推荐(0) 编辑
摘要: 反射是为了程序在运行时程序能获取到一些关于程序集(assembly),class,method,property的一些信息的 这样的机制反射相当于一种进程,这种进程可以修改自己机构和行为的一种能力.string s = "Hello Reflection"; Type t = ... 阅读全文
posted @ 2015-06-05 10:54 乔闻 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 自定义特性class Program { static void Main(string[] args) { Console.ReadLine(); } } [AttributeUsage(AttributeTarge... 阅读全文
posted @ 2015-06-05 09:03 乔闻 阅读(145) 评论(0) 推荐(0) 编辑