04 2009 档案
摘要:文件比较器源码下载: /Files/ycdx2001/FileComparer.rar
阅读全文
摘要:C#实现文件拖放: 主要用窗体的AllowDrop属性和DragEnter事件来实现 窗体加载设 AllowDrop=true; Code Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> private void Form1_DragE...
阅读全文
摘要:返回当前系统的临时文件夹的路径: Path.GetTempPath(); 获取或设置当前工作目录的完全限定路径: Environment.CurrentDirectory 属性 获取启动了应用程序的可执行文件的路径,不包括可执行文件的名称: Application.StartupPath 属性
阅读全文
摘要:System.Web.Security: 为 Web 应用程序管理 Forms 身份验证服务。无法继承此类: FormsAuthentication类 权限管理: System.Web.Security.RoleProvider抽象类 SiteMap权限管理: System.Web.XmlSiteMapProvider BFA 角色权限管理类: BFA.Presentatio...
阅读全文
摘要:Enum Discription Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> 1 namespace EnumDiscription 2 { 3 4 enum MyColors 5 { 6 ...
阅读全文
摘要:使用this关键字,构造函数的相互调用 Code Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->public class Person { public Person():this(null) ...
阅读全文
摘要:Create many-to-many relationships in LINQ for SQL: http://www.codeproject.com/KB/database/LINQ_many2many.aspx 博客园Linq专题: http://kb.cnblogs.com/zt/linq/ 不能不说的C#特性-迭代器(下),yield以及流的延迟计算 http://kb.cnbl...
阅读全文
摘要:App.config文件有如下内容: AppSettingsSection 对象包含配置文件的 appSettings 节的内容 var userName = ConfigurationManager.AppSettings["username"]; var pwd ...
阅读全文
摘要:将对象序列化为Json对象 Book book=new Book{ } JavaScriptSerializer serializer = new JavaScriptSerializer(); string serializeResult = serializer.Serialize(book);
阅读全文
摘要:C#数字格式化输出 int a = 12345678; //格式为sring输出 Label1.Text = string.Format("asdfadsf{0}adsfasdf",a); Label2.Text = "asdfadsf"+a.ToString()+"adsfasdf"; Label1.Text = string.Format("asdfadsf{0:C}adsfasdf...
阅读全文
摘要:1.创建Xml树 Gaby 12 GuangZhou Bill 33 USA BiLy 19 HuNan 如果要创建如上的XML树: 代码示例: XElement x...
阅读全文
摘要:更多请参见:http://www.w3school.com.cn/htmldom/dom_obj_event.asp
阅读全文
摘要:ASP.net MVC Mock Context(上下文) Code var fakeContext = new FakeControllerContext(controller, new NameValueCollection(), new NameValueCollection()); Code highlighting produced by Actipro CodeHighli...
阅读全文

浙公网安备 33010602011771号