摘要: 对于windows 系统API函数的调用在程序设计中有时是必不可少的,各种编程语言都规范了调用的方法和接口,在C#语言中的调用方法如下(以下编程环境为Visual Studio .NET):  1、 在工程项目中添加一个类新项,打开这个类文件,在文件头部加入对以下命名空间的引用:   using System.Runtime.InteropServices;    在类定义主体中,以静态调用的方式加入对API的引用,本文以下的API调用为例:   /// summary   /// 打开和关闭CD托盘.   /// /summary   [DllImport("winmm.dll" , 阅读全文
posted @ 2009-04-20 19:56 GT_Andy 阅读(572) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Text;using System.Text.RegularExpressions;namespace Validator{ /**//// summary /// RegExp Soruce: http://regexlib.com/DisplayPatterns.aspx /// Author:柳永法 yongfa365 http://www.yongfa365.com/ yongfa365@qq.com /// Intro:验证 网址,IP,邮箱,电话,手机,数字, 阅读全文
posted @ 2009-04-20 13:16 GT_Andy 阅读(347) 评论(0) 推荐(0) 编辑