摘要:
定义自定义事件消息:public class CustomEventArgs : EventArgs{public CustomEventArgs(string s){ message = s;}private string message;public string Message{ get { return message; } set { message = value; }}}实例化自定义... 阅读全文
摘要:
如果服务端和客户端在同一个进程内, 不能使用tcp,http绑定,只能使用命名管道绑定 阅读全文
摘要:
EventHandler是一种被定义好的delegate,并且同时限制了不能使用直接实例化的方式来实例化,只能通过+=/-=方式实例化://错误方式:Event EventHandler eat = new EventHandler(Button1_Click());//正确方式:Event EventHandler eat; eat += new EventHandler(Button1_Cli... 阅读全文
摘要:
定义: delegate void Action();实例化:Action eat = new Action(EatAc);//EatAc为一个方法调用: eat();//实际上C#编译器知道eat是一个delegate,所以它生成的是调用eat的Invoke方法,实际上可以直接调用eat.Invoke();也可以使用+=和-=来绑定多个方法,如: eat += new Action(Eat);e... 阅读全文
摘要:
默认的4M,LENGTH以kb为单位<system.web><httpRuntime maxRequestLength="10240"/></system.web>注:本随笔为本人总结后发布,如果有雷同,纯属巧合本人邮箱:freedomjim@gmail.com,如有疑问和交流欢迎发邮件过来一起讨论,一起成长,谢谢! 阅读全文