zoukankan      html  css  js  c++  java
  • 我的Util类,东拼西凑的:)

    //*--------------------------------------
    //*  Create By Yesun .Net Tool V1.1
    //*  Email:edzh@tom.com QQ:363980
    //*  Msn:dyesur@hotmail.com
    //*  Web http://edzh.com
    //*  DateTime 2005-02-13
    //*--------------------------------------
    using System;
    using System.Collections;
    using System.ComponentModel;
    using System.Data;
    using System.Web;
    using System.Xml;
    using System.Xml.Xsl;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.HtmlControls;
    using System.Text.RegularExpressions;
    using System.IO;
    using System.Configuration;
    using System.Threading;
    using System.Text;
    using log4net;
    using System.Drawing;
    using System.Runtime.InteropServices;
    using System.Diagnostics;
    using System.Reflection;

    namespace Yesun.Edzh.Util
    {
        
    /// <summary>
        
    /// 常用函数 - CommFunction
        
    /// </summary>

        public class Utils
        
    {
            
    private static Regex RegNumber = new Regex("^[0-9]+$");
            
    private static Regex RegNumberSign = new Regex("^[+-]?[0-9]+$");
            
    private static Regex RegDecimal = new Regex("^[0-9]+[.]?[0-9]+$");
            
    private static Regex RegDecimalSign = new Regex("^[+-]?[0-9]+[.]?[0-9]+$"); //等价于^[+-]?\d+[.]?\d+$
            private static Regex RegEmail = new Regex(@"^[\w-]+@[\w-]+\.(com|net|org|edu|mil|tv|biz|info)$");//w 英文字母或数字的字符串,和 [a-zA-Z0-9] 语法一样
            private static Regex RegCHZN = new Regex("[\u4e00-\u9fa5]");//中文
            private static readonly log4net.ILog log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
            
    private static FileVersionInfo AssemblyFileVersion = FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location);
            
    static object lockObject = new object();

            
    Common

            
    File

            
    带时间的GUID

            
    Hashtable

            
    permission

            
    xml/xslt

            
    MD5/safe


            
    字符串操作

            
    数字字符串检查

            
    中文检测

            
    邮件地址

            
    其他

            
    消息提示对话框

            
    backup/restore file

            
    PageBar

        }

    }

  • 相关阅读:
    有效获取状态栏(StatusBar)高度
    各种数据库连接
    Spring AOP 原理
    Spring ioc 原理
    转载的别人的ajax跨域解决方法
    如何监听input的脚本赋值
    JAVA之Socket编程
    JAVA中的多线程
    JAVA文件操作
    实验三 kali下metasploit的漏洞攻击实践
  • 原文地址:https://www.cnblogs.com/yesun/p/1255812.html
Copyright © 2011-2022 走看看