持久层框架:Db4objects [Db4objects.Db4o.dll]
    
                
摘要:DBContext 1 public class DBContext 2 { 3 private static IObjectContainer _db; 4 public static IObjectContainer DB 5 { 6 get 7 { 8 if (_db == null) 9 {10 11 _db = Db4oFactory.OpenFile(Path);12 }13 ...
        
阅读全文
                    posted @ 
2012-12-09 14:16 
极简
        
阅读(473) 
         
        推荐(0)     
                 
                
                
    正则表达式详解[C#]
    
                
摘要:正则表达式常用功能:匹配,捕获,替换。匹配是基础,捕获是关键,替换就是在前面基础上调整一下位置。[url重写:正则表达式替换]1 string lookFor="^~/root/(\w{1,20})/somepage/(\d{1,8})/(\w)*?/(\d{1,8}).aspx$"2 string...
        
阅读全文
                    posted @ 
2012-12-09 14:15 
极简
        
阅读(456) 
         
        推荐(0)     
                 
                
                
    检测 邮箱地址 是否存在[C#]
    
                
摘要:[检测某个邮箱地址是否存在]CheckEmail 1 public class CheckEmail 2 { 3 private static string mailQQ = "http://emailreg.qq.com/cgi-bin/signup/ajaxcheckmail?type=1&email={0}"; 4 private static string mailFox = "http://emailreg.qq.com/cgi-bin/signup/ajaxcheckmail?type=3&email={0}"; 5 priv
        
阅读全文
                    posted @ 
2012-12-09 14:15 
极简
        
阅读(676) 
         
        推荐(0)     
                 
                
                
    Url 相关操作
    
                
摘要:【301重定向】1 static void Redirect301(string url)2 {3 HttpContext.Current.Response.StatusCode = 301;4 HttpContext.Current.Response.RedirectLocation = url;5 HttpContext.Current.Response.End();6 }【串行参数】1 static string GetQueryString(NameValueCollection list)2 {3 StringBuilder sb...
        
阅读全文
                    posted @ 
2012-12-02 17:23 
极简
        
阅读(199) 
         
        推荐(0)     
                 
                
                
    C# 加密算法[汇总]
    
                
摘要:【散列类型】 不可逆,严格说不算加密算法,是一种保证数据完整性的算法或数字签名.MD5 1 public static string EnMd5(string str) 2 { 3 string pwd = ""; 4 MD5 md5 = MD5.Create(); 5 //注意编码UTF8/Unicode 6 byte[] s = md5.ComputeHash(Encoding.UTF8.GetBytes(str)); 7 for (int i = 0; i < s.Length; i++) 8 { 9 pwd = ...
        
阅读全文
                    posted @ 
2012-12-02 17:19 
极简
        
阅读(925) 
         
        推荐(0)