随笔分类 - c#
摘要:int[] a = { 9, 3, 6, 2, 7, 4, 8, 5, 4,1,10,27,35,49,20,19 }; void DirIinsertSort(int[] b) { int temp1; for(int i =1; i < b.Length;i++) { temp1 = b[i];
阅读全文
摘要:一、首先定义数据类 [DataContract(Namespace="http://www.cninnovation.com/Services/2012")] public class RoomReservation : INotifyPropertyChanged { private int id
阅读全文
摘要:概述:通过bing的图片搜索引擎,开发自己的图片搜索应用程序。bing的图片搜索接口是收费的,但是初次注册使用,key可以免费试用30天 程序运行效果如下 一,代码如下 static SearchResult BingImageSearch(string searchQuery) { // Cons
阅读全文
摘要:通过HtmlAgilityPack 实现对html页面解析HtmlDocument doc = new HtmlDocument(); doc.Load(yourStream); var itemList = doc.DocumentNode.SelectNodes("//span[@class='
阅读全文
摘要:使用模拟登录大致可以分为两步 一、post登录获取cookis public CookieContainer GetCookie(string url,string account,string password, out bool result) { CookieContainer cc = ne
阅读全文
摘要:public delegate void AsyncDelegate(); private AsyncDelegate asyncDl; asyncDl = new AsyncDelegate(() => { //todo }); AsyncCallback callBack = new Async
阅读全文
摘要:using System.Security.AccessControl; //设置myFloder文件夹的iis访问权限 string userAccount = @"IIS_IUSRS"; string filePath = @"C:\inetpub\myFloder"; DirectorySec
阅读全文