CSS代

.NET

C# 识别url是否是网络路径

85 0

123456789101112131415161718#region 识别urlStr是否是网络路径 /// <summary> /// 识别urlStr是否是网络路径 /// </summary> /// <param name="urlStr"> /// <returns></returns>

.NET

C#将文件上传、下载(以二进制流保存到数据库)

425 0

1、将文件以二进制流的格式写入数据库首先获得文件路径,然后将文件以二进制读出保存在一个二进制数组中,与数据库建立连接,在SQL语句中将二进制数组赋值给相应的参数,完成向数据库中写入文件的操作12345678910111213141516171819202122232425262728293031/// 将文件流写入数据库 /// /// <param name="filePath">存

.NET

C#实现图标锁定到Windows任务栏或删除图标

180 0

这个功能在windows上测试安装卸载时,有时会用到123456789101112131415Shell shell = new Shell(); Folder folder = shell.NameSpace(Path.GetDirectoryName(appPath)); FolderItem app = folder.ParseName(Path.GetFileName(appPath)); string sVerb = isLock ? "锁定到任务栏(&K)" : "从任务栏脱离(&K)"

.NET

C#读取host文件代码

265 0

1234567891011121314151617181920212223242526272829303132333435using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.IO;using System.Text;using System.Windows.Forms; namespace 读取host

.NET

C#访问SqlServer的工具类SqlServerHelper

670 0

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121

.NET

C#操作MySQL的工具类MySqlHelper

1101 0

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121

.NET

C#中登陆账户使用的MD5加密算法

45 0

1234567891011121314public static string GetMD5(string sDataIn) { MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider(); byte[] bytValue, bytHash; bytValue = System.Text.Encoding.UTF8.GetBytes(sDataIn);

.NET

C#查找字符串的所有排列组合

57 0

C#查找字符串的所有排列组合123456789101112131415161718192021222324252627282930313233343536373839// 1. remove first char// 2. find permutations of the rest of chars// 3. Attach the first char to each of those permutations.// 3.1 for each permutation, move firstCha