苏木清华

--一些小记录

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

2010年10月19日

摘要: Windbey中为了增强对集合的访问能力, MS设计了List<T>这么一个泛型集合, 其中有不少的增强功能,比如Foreach,ConvertAll,FindAll等等,并且为了方便使用MS在System名空间下引入了一些特制的Delegate.主要包括以下几个:20public delegate void Action<T>(T obj); //Used by ForE... 阅读全文
posted @ 2010-10-19 09:09 苏木清华 阅读(176) 评论(0) 推荐(0)

摘要: ContentEditable="false" certmgr.msc js 按钮状态 function DisableButton(ControlID) { document.getElementById(ControlID).value = gl('BeingSummit'); document.getElementById(ControlID).onclick = Function("re... 阅读全文
posted @ 2010-10-19 09:02 苏木清华 阅读(91) 评论(0) 推荐(0)

2010年10月18日

摘要: Method1method1=()=>{inti=4;i+=6;};Method2method2=i=>{i++;i+=6;};Method3method3=(x,y)=>{x++;y++;returnx+y;};publicdelegateboolFilter(intnum);Filterfilter=i=>{return(i&1)==0;};Filterfilt... 阅读全文
posted @ 2010-10-18 12:52 苏木清华 阅读(102) 评论(0) 推荐(0)

摘要: 如果要查询 IEnumerable<Customer>,则输入变量将被推断为 Customer 对象,这意味着您可以访问其方法和属性:customers.Where(c => c.City == "London"); 阅读全文
posted @ 2010-10-18 12:21 苏木清华 阅读(178) 评论(0) 推荐(0)

摘要: Lambda 语句的主体可以包含任意数量的语句;但是,实际上通常不会多于两个或三个语句。 阅读全文
posted @ 2010-10-18 12:19 苏木清华 阅读(327) 评论(0) 推荐(0)

摘要: 所有 Lambda 表达式都使用 Lambda 运算符 =>,该运算符读为“goes to”。该 Lambda 运算符的左边是输入参数(如果有),右边包含表达式或语句块。Lambda 表达式 x => x * x 读作“x goes to x times x”。可以将此表达式分配给委托类型,如下所示:delegate int del(in... 阅读全文
posted @ 2010-10-18 10:41 苏木清华 阅读(185) 评论(0) 推荐(0)

摘要: using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.UI;using System.Web.UI.WebControls;namespace WebApp{ public partial class ExFunction : System.Web.UI.P... 阅读全文
posted @ 2010-10-18 10:12 苏木清华 阅读(114) 评论(0) 推荐(1)

2010年10月15日

摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using Microsoft.Contracts;namespace LosTechies.DaysOfRefactoring.SampleCode.DesignByContract.After{ public class CashR... 阅读全文
posted @ 2010-10-15 15:21 苏木清华 阅读(162) 评论(0) 推荐(1)

摘要: using System.Collections.Generic;namespace LosTechies.DaysOfRefactoring.EncapsulateCollection.After{ public class Order { private List<OrderLine> _orderLines; private double _orderTotal; public ... 阅读全文
posted @ 2010-10-15 14:19 苏木清华 阅读(138) 评论(0) 推荐(0)

2010年3月21日

摘要: 引用:http://tech.ddvip.com/2009-02/1233904417107534.html  使用面向服务的体系结架构(SOA)的其中一大动力在于提升企业的敏捷度,并将不可避免的改变所带来的影响减到最小。这一般通过把经常改变和相当稳定的实现工件进行分离来完成。支持这种分离的常用方法是分解(decomposition)和封装(encapsulation)。SOA的分解导致服务的定义... 阅读全文
posted @ 2010-03-21 14:46 苏木清华 阅读(554) 评论(0) 推荐(1)