
在注册表启动项里添加一项,路径:SOFTWAREMicrosoftWindowsCurrentVersionRun或者直接:运行->regedit找到这个路径添加一项....
引用集:using System.Data.OleDb;复制代码 代码如下:static string exePath = System.Environment.CurrentDirectory;//本程....
复制代码 代码如下:/// /// 读写INI文件的类。 /// public class INIHelper { // ....
着重说一下策略模式。首先需要定义一个接口,该接口用来统一报警方法,代码如下: 复制代码 代码如下:/// /// 报警接口,统....
代码:复制代码 代码如下:using System;using Microsoft.VisualBasic.FileIO;namespace leaver{class Program{ static void ....
我通常用GridView绑定datatable,由于需要动态绑定到不同的datatable所以需要动态调整GridView的宽度。所以写了这个函数实现....
术语表 generics:泛型type-safe:类型安全collection: 集合compiler:编译器run time:程序运行时object: 对象.NET library....
下载地址:http://nsoup.codeplex.com/ 简单用法如下: 复制代码 代码如下:NSoup.Nodes.Document doc = NSoup.NSoupClient.P....
一、初始化数组: 复制代码 代码如下:string[] s1 = {“aaa”,”bbb”,”ccc”} //直接赋值string[] s2 = new string[5]....
下面是完整的例子,可以通过命令行编译即可看到效果。复制代码 代码如下:using System;using System.Drawing;using System.W....
先上效果图:工具类 在解析的过程中,我们会和byte做各种运算,所以我定义了一个byte工具类ByteUtils: 复制代码 代码如下:u....
复制代码 代码如下:string str="aaa|||bbb|||ccc"; string[] sArray=str.Split(new[] { "|||" }, StringSplitOptions.Remove....
软件行业发展到今天,国际化问题一直都占据非常重要的位置,而且应该越来越被重视。对于开发人员而言,在编写程序之前,国际....
复制代码 代码如下:产生私钥和公钥System.Security.Cryptography.RSACryptoServiceProvider myrsa = new RSACryptoServicePr....
屏幕保护程序的扩展名虽然是"scr",但其实是一个可执行的"exe"文件。但他又是一个比较独特的"exe"文件。下面就来探讨一下,....
复制代码 代码如下:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Run....
例子一,获取三小时前的记录public static DataTable Query(){const string sSql = "select xh,lsh,name from table wh....
代码如下: 复制代码 代码如下:public void MonitorWeb(Model.ServiceInfo mServerInfo){var sUrl = mServerInfo.ServiceCon....
复制代码 代码如下:static string GetHtml(string url) { HttpWebRequest request = W....
复制代码 代码如下:using System;using System.Collections;using System.IO; namespace ConsoleApplication1{ /// ....