随笔分类 - C#源码收藏
摘要:1publicclassConverMoney2{3publicstaticstringConvertToUpper(doubleinputNum)4{5stringstrTemp=inputNum.ToString("f2");6returnProcessLeft(strTemp)+ProcessRight(strTemp);7}89#region处理整数部分10privatestaticstr...
阅读全文
摘要:publicclassRegCtrl{privatestaticRegistryKeyrootkey;//////构造根键为RootKey的注册表操作类,缺省打开Current_User主键///publicRegCtrl(stringRootKey){switch(RootKey.ToUpper()){case"CLASSES_ROOT":rootkey=Registry.ClassesRoot...
阅读全文
摘要:publicclassXmlControl:Object{protectedstringstrXmlFile;protectedXmlDocumentobjXmlDoc=newXmlDocument();publicXmlControl(stringXmlFile,BooleanbOverWrite,stringsRoot){try{//如果覆盖模式,则强行创建一个xml文档if(bOverWri...
阅读全文
摘要:publicclassRegexlib{publicRegexlib(){}//搜索输入字符串并返回所有href=“”值stringDumpHrefs(StringinputString){Regexr;Matchm;r=newRegex("href\\s*=\\s*(?:\"(?<1>[^\"]*)\"|(?<1>\\S+))",RegexOptions.IgnoreCa...
阅读全文
摘要:该方法可以使程序不通过web引用的方式去调用webservices方法,直接在代码里调用该方法就能达到动态调用webservices的目的。使用前先引用System.Web.Services动态链接库,是.net自带的dll。 方法如下: using System;using System.Collections.Generic;using System.Text;using System.Net...
阅读全文