yushff

code the world。

导航

2014年8月7日

摘要: public static string GetLocalIP(){try{string HostName = Dns.GetHostName(); //得到主机名IPHostEntry IpEntry = Dns.GetHostEntry(HostName); for (int i=0; i < ... 阅读全文

posted @ 2014-08-07 00:39 yushff 阅读(559) 评论(0) 推荐(0)

摘要: Regex构造函数Regex(string pattern)Regex(string pattern,RegexOptions options)参数说明pattern:要匹配的正则表达式模式options:指定是否要编译,忽略大小写等等Regex.Replace方法-C#Regex.Replace(... 阅读全文

posted @ 2014-08-07 00:36 yushff 阅读(3355) 评论(0) 推荐(0)

摘要: 查找List中的某个值,可以使用循环遍历对比,查找出结果。C#中提供了Find方法,可以直接使用,只要查找条件传入就可。如下:public class RecordInfo { private string recordID = string.Empty; ... 阅读全文

posted @ 2014-08-07 00:35 yushff 阅读(1745) 评论(0) 推荐(0)