凤2鸡

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2015年5月13日

摘要: public static void EditValue(this IList array, Func where, T newobjs) { Type t = typeof(T); if (array.Any(where)) ... 阅读全文
posted @ 2015-05-13 11:29 凤2鸡 阅读(191) 评论(0) 推荐(0) 编辑

摘要: 1.集合接口与集合类型(1)集合的命名空间大多数集合类都可以在 System.Collections 和 System.Collections.Generic 名称空间中找到。泛型集合位于 System.Collections.Generic 名称空间中;专用于特定类型的集合类位于 System.C... 阅读全文
posted @ 2015-05-13 07:42 凤2鸡 阅读(180) 评论(0) 推荐(0) 编辑

2015年5月12日

摘要: 在C系列语言中,for循环扮演着重要的角色。很难想象,一百行C代码里面没有一个for循环(我有个朋友,写了个几千行的算法,没有用的for循环,我当时很惊讶),就好比,一百行中文里面,没有一个"的"。可见,for循环是代码的基本构造块。由于for循环,一般是用来,对一串类型相同的对象进行操作的,从侧面... 阅读全文
posted @ 2015-05-12 20:12 凤2鸡 阅读(1118) 评论(0) 推荐(0) 编辑

2015年4月1日

摘要: 一般我们要绑定个按钮的状态Enabled属性时,有可能刚好是取对应的反值,比如我绑定的是线程里一个bool的IsRunning,一般添加代码的方式为button1.DataBindings.Add("Enabled", OrderViewModel.Instance.Commands.ThreadM... 阅读全文
posted @ 2015-04-01 18:13 凤2鸡 阅读(1609) 评论(0) 推荐(0) 编辑

2013年9月20日

摘要: using System;using System.Collections.Generic;using System.Text;namespace blqw{ public class QuickStringWriter : IDisposable { public QuickStringWriter() : this(2048) { } /// /// 实例化新的对象,并且指定初始容量 /// /// public QuickStringWriter(int capacity) ... 阅读全文
posted @ 2013-09-20 10:33 凤2鸡 阅读(331) 评论(0) 推荐(0) 编辑

2013年9月1日

摘要: //取自动排序大小private Int64 SeqInt(int size){var jobs = db.GetCollection("Counters");var query = Query.And(Query.EQ("_id", "TaoBaoItem"));var sortBy = SortBy.Descending("next");var update = Update.Inc("next", (Int64)size);//.Push("new", true).Pu 阅读全文
posted @ 2013-09-01 19:42 凤2鸡 阅读(1324) 评论(0) 推荐(0) 编辑

2013年5月29日

摘要: 添加引用using System.Runtime.InteropServices;声明useragent标志 private string userAgent = "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)";添加API操作[DllImport("urlmon.dll", CharSet = CharSet.Ansi)]private static extern int UrlMkSetSessionOption(int dwOption, string 阅读全文
posted @ 2013-05-29 12:11 凤2鸡 阅读(1215) 评论(0) 推荐(0) 编辑