摘要: 序列化一个对象 public static string ToJson( object obj) { string json = JsonConvert .SerializeObject(obj); return json; }反序列化一个字符串到对象string json = @"{ ""Name"": ""Apple"... 阅读全文
posted @ 2013-11-23 23:33 Leo_Lei 阅读(854) 评论(0) 推荐(0) 编辑
摘要: *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo *.rej *~ #*# .#* .*.swp .DS_Store *.dll *.exe *.pdb *\bin *\log *\obj *\Bin *.db *.tmp *.suo *.csproj.user *.Publish.xml *.elc *_notes* *\D... 阅读全文
posted @ 2013-11-23 23:20 Leo_Lei 阅读(779) 评论(0) 推荐(0) 编辑
摘要: /// /// 18位身份证验证。比较简单的验证。但基本够用了 /// private void TestValidateIdCard() { Regex regex = new Regex(@"^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X... 阅读全文
posted @ 2013-11-23 23:17 Leo_Lei 阅读(246) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Net;using System.Text;public class HttpRequestHelper{ /// /// 提交数据到某网页 /// public static s... 阅读全文
posted @ 2013-11-23 23:12 Leo_Lei 阅读(406) 评论(0) 推荐(1) 编辑
摘要: 什么是linq to NHibernate 什么是linq to NHibernate?说简单一点就是linq + NHibernate。 linq语句是.Net 3.5中新增的功能,从问世以来就博得了广大码农的爱好。有了linq,查询变得更方便了。 NHibernate大家也都知道的,一个ORM框架,从java的Hibernate移植过来。用于数据的持久化。 那么linq to N... 阅读全文
posted @ 2013-11-23 20:33 Leo_Lei 阅读(343) 评论(0) 推荐(0) 编辑