随笔分类 - .NET
摘要://path:xml文件路径 SECSMessage:xml文件的根元素下的第一个子集元素 <SECSLibrary> <SECSMessage> <Description name="hello"> hello </Description> </SECSMessage> <SECSMessage>
阅读全文
摘要:1.开发windows服务程序,不应该在程序中调用windform相关的方法与类库,会产生未知的异常,windows服务中是可以产生日志文件的,会生成在安装服务的当前路径下面,比如服务为D:/MyService.exe ,那么日志就会出现在该文件夹,启动服务 net start 服务名 2.C#去除
阅读全文
摘要:string param = string.Format("username={0}&password={1}", account, pwd); string result = HttpPost(URL, param); private string HttpPost(string Url, str
阅读全文
摘要:多个约束之间使用逗号隔开,但不重复T约束。 1. private void AddControl<T>(TabPage tabPage, T userControl) where T: UserControl,new()
阅读全文
摘要:private DataTable dt = new DataTable(); BindingSource bs = new BindingSource(); /// <summary> /// 初始化DataTable /// </summary> public void InitDataTabl
阅读全文
摘要:Application.DoEvents(); 支持在快速刷新界面的同时,允许响应消息的机制(刷新界面过程中的按钮点击也属于消息一种) 切记:不要再程序中频繁使用该语句,使用弊端是由于需要不断的轮询各个消息,会影响程序的性能。
阅读全文

浙公网安备 33010602011771号