• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






wulion

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

2013年7月10日

资源地址
摘要: 正则表达式的使用 http://www.regexlab.com/zh/regref.htmHttp协议的相关知识 Http请求抓包的方法 http://www.fiddler2.com/fiddler2/火车头数据采集 http://www.locoy.com/ 阅读全文
posted @ 2013-07-10 15:03 wulion 阅读(137) 评论(2) 推荐(0)
 

2013年6月27日

C#中var 使用
摘要: 1. 必须在定义时初始化。也就是必须是var s = “abcd”形式,而不能是如下形式:var s;s = “abcd”;2. 一但初始化完成,就不能再给变量赋与初始化值类型不同的值了。3. var要求是局部变量。4. 使用var定义变量和object不同,它在效率上和使用强类型方式定义变量完全一样1 //使用var 保存查询的结果 var query = from student in list where student.Age > 1 select student.Name;2// //用var创建匿名类对象 var Student = new { ID = 1, Name =. 阅读全文
posted @ 2013-06-27 17:31 wulion 阅读(451) 评论(0) 推荐(0)
 

2013年6月26日

XML 中Descendants<T> 方法
摘要: 1.XElement xmlTree = XElement.Parse(@" This is some text where all of the nodes must be concatenated. This is a second sentence. ");IEnumerable elList = from el in xmlTree.Elements("Para").Descendants() select el;foreach (XEleme... 阅读全文
posted @ 2013-06-26 17:21 wulion 阅读(748) 评论(0) 推荐(0)
 
c#扩展方法
摘要: 我经常需要写一些根据对象属性名字来判断这个对象是否有这个属性或者根据属性名获取该属性的值public static class PropertyExtension { public static object GetValueByName(this Person self,string propertyName) { if (self == null) { return self; } Type t = self.GetType(); PropertyInfo p = t.GetProperty(propertyName); return p.GetValue(self, null); } } 阅读全文
posted @ 2013-06-26 10:11 wulion 阅读(129) 评论(0) 推荐(0)