C# 正则表达式

摘要: (1)清除掉字符串中的所有<img/>标签 FrmUniscopeProfile frm = new FrmUniscopeProfile(); Regex regex = new Regex("<img .*/>"); //去除xml中的<img> MatchCollection matches = regex.Matches(htmlWin[0]); for (int i = 0; i <= matches.Count - 1; i++) { html... 阅读全文
posted @ 2012-06-12 17:11 imihiro 阅读(255) 评论(0) 推荐(0)

C# WebBrowser显示html字符串

摘要: public void NavigateToUrl(string url) { this.webBrowser1.Navigate(url); } public void ShowHtmlStr(string htmlStr) { this.webBrowser1.DocumentText = htmlStr; } 阅读全文
posted @ 2012-06-12 16:16 imihiro 阅读(7872) 评论(0) 推荐(0)

C# Math函数 字符串、整数装换

摘要: (1)16进制字符串转整数 //常用于string 颜色转 int color (例如#ffffff转 65535) string argb=node.SelectSingleNode("RenderStyle/PenStyle/PenColor").InnerText; int rgbValue = Convert.ToInt32(argb, 16); var colorSet = new string[] { "#ff880000", "#ffff0000", "#ff008800", "#ff00f 阅读全文
posted @ 2012-06-12 11:06 imihiro 阅读(645) 评论(0) 推荐(0)