代码改变世界

阅读排行榜

序列化

2011-07-01 11:27 by Carl Xing, 340 阅读, 收藏,
摘要: 1 using System; 2 using System.Collections.Generic; 3 using System.Text; 4 using System.Runtime.Serialization.Formatters.Binary; 5 using System.IO; 6 using System.Xml.Serialization; 7 8 9 public class SerializeObjectFactory 10 { 11 12 /// <summary> 13 /// 序列化为二进制文件 14 /// </summary> 15 / 阅读全文

Xml反序列化

2015-07-21 09:47 by Carl Xing, 335 阅读, 收藏,
摘要: XML的反序列化可在类的属性上标记特性来隐射反序列化。例如这种形式public class PaymentAccount { [XmlAttribute("name")] public string Name { get; set; } ... 阅读全文

Event委托

2011-08-09 11:56 by Carl Xing, 298 阅读, 收藏,
摘要: public class ArgButton:Button { public delegate void OnArgClick(btnEventArgs e); public event OnArgClick ArgClick; private string Args { get; set; } public ArgButton() { } public ArgButton(string args) { ... 阅读全文

为VisualStudio默认模板添加版权信息

2012-08-13 14:56 by Carl Xing, 297 阅读, 收藏,
摘要: 类及接口模板自定义:文件夹下打开code.zip , interface.zipvs2010在Microsoft Visual Studio 10……文件夹下双击打开压缩包,不要解压。然后双击模板文件, IDE会自动启动打开文件/*----------------------------------------------------------------------------------- * 版权所有:xxx科技有限责任公司 * 作者:xxx * 联系方式:xxx * 创建时间:$time$ * 版本号:V1.0 * 本类主要用途描述: ------------------------ 阅读全文

创建、停止、删除 windows服务

2013-01-08 17:34 by Carl Xing, 291 阅读, 收藏,
摘要: cmd console中,或保存成bat文件执行sc create 服务名称 binpath= 执行文件路径 type= own start= auto displayname= 服务展示名称=后面要有空格net stop服务名称sc delete服务名称 阅读全文