上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 37 下一页
摘要: http://www.silverlightchina.net/html/study/shipinjiaocheng/2010/1113/3322.html Silverlight 4企业大革命之订单系统 阅读全文
posted @ 2011-03-24 16:47 Ken-Cai 阅读(301) 评论(0) 推荐(0)
摘要: http://blog.chinahr.com/blog/³ÌÓ¢º¼/post/29635http://www.yesky.com/20011209/209018.shtmlusing System.Net.Mail;try { MailMessage mail = new MailMessage("发送@163.com", "接收方@qq.com", "主题 ", "电子邮件的主要内容"); SmtpClient smtp = new SmtpClie 阅读全文
posted @ 2011-03-14 14:58 Ken-Cai 阅读(191) 评论(0) 推荐(0)
摘要: http://blog.csdn.net/lizhizhe2000/archive/2006/09/19/1249209.aspxusing System;using System.Runtime.InteropServices;namespace EAE.MyServiceInstaller{class ServiceInstaller{ #region Private Variables private string _servicePath; private string _serviceName; private string _serviceDisplayName; #endregi 阅读全文
posted @ 2011-03-11 18:03 Ken-Cai 阅读(313) 评论(0) 推荐(0)
摘要: http://www.cnblogs.com/anjou/archive/2008/05/20/1203290.html使用C#代码安装 Windows 服务(不使用InstallUtil) usingSystem;usingSystem.Collections.Generic;usingSystem.ServiceProcess;usingSystem.Configuration.Install;staticclassProgram{///<summary>///应用程序的主入口点。///</summary>[STAThread]staticvoidMain(stri 阅读全文
posted @ 2011-03-11 17:58 Ken-Cai 阅读(439) 评论(0) 推荐(0)
摘要: 下面是一个比较综合的示例,对于匹配[0,100],需要特殊考虑的地方包括*00合法,00.合法,00.00合法,001.100合法*空字符串不合法,仅小数点不合法,大于100不合法*数值是可带后缀的,如“1.07f”表示该值为一个float类型(未考虑) CodeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->Regexr=newRegex(@"^\+?0*(?:100(\.0*)?|(\d{0,2}(?=\.\d)|\d{1,2} 阅读全文
posted @ 2011-03-08 15:10 Ken-Cai 阅读(654) 评论(0) 推荐(0)
摘要: 有些需求要做到精确匹配比较困难,例如:日期、Url、Email地址等,其中一些你甚至需要研究一些专门的文档写出精确完备的表达式,对于这种情况,只能退而求其次,保证比较精确的匹配。例如对于日期,可以基于应用系统的实际情况考虑一段较短的时间,或者对于像Email的匹配,可以只考虑最常见的形式。 阅读全文
posted @ 2011-03-08 15:10 Ken-Cai 阅读(145) 评论(0) 推荐(0)
摘要: 正则表达式中,可以使用 "\xXX" 和 "\uXXXX" 表示一个字符("X" 表示一个十六进制数)形式字符范围:\xXX 编号在 0到255 范围的字符,比如:空格可以使用 "\x20" 表示。\uXXXX 任何字符可以使用 "\u" 再加上其编号的4位十六进制数表示,比如:汉字可以使用“[\u4e00-\u9fa5]”表示。 阅读全文
posted @ 2011-03-08 15:09 Ken-Cai 阅读(3462) 评论(0) 推荐(0)
摘要: 正向预搜索声明格式:正声明 “(?=…)”,负声明 “(?!...)” ,声明本身不作为最终匹配结果的一部分,请看下面的示例: CodeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->stringx="1024used2048free";Regexr1=newRegex(@"\d{4}(?=used)");if(r1.Matches(x).Count==1){Console.WriteLine(&quo 阅读全文
posted @ 2011-03-08 15:08 Ken-Cai 阅读(445) 评论(0) 推荐(0)
摘要: 使用“(?>…)”方式进行非回溯声明。由于正则表达式引擎的贪婪特性,导致它在某些情况下,将进行回溯以获得匹配,请看下面的示例: CodeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->stringx="Livefornothing,dieforsomething";Regexr1=newRegex(@".*thing,");if(r1.IsMatch(x)){Console.WriteLine(& 阅读全文
posted @ 2011-03-08 15:07 Ken-Cai 阅读(294) 评论(0) 推荐(0)
摘要: 正则表达式的引擎是贪婪,只要模式允许,它将匹配尽可能多的字符。通过在“重复描述字符”(*,+)后面添加“?”,可以将匹配模式改成非贪婪。请看以下示例: CodeCode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->stringx="Livefornothing,dieforsomething";Regexr1=newRegex(@".*thing");if(r1.IsMatch(x)){Console.Wri 阅读全文
posted @ 2011-03-08 15:06 Ken-Cai 阅读(161) 评论(0) 推荐(0)
上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 37 下一页