摘要:
Date.prototype.format = function (format) { var o = { "M+": this.getMonth() + 1, //month "d+": this.getDate(), //day "h+": this.getHours(), //hour "m+": this.getMinutes(), //minute "s+": this.getSeconds(), //second "q+": Math.floor((this.ge 阅读全文
摘要:
之前一直想当然地认为一个对象实现了IDisposable接口,执行GC.Collect方法后,GC会帮助我们自动实现对所有资源的回收。比如下面的一段代码:1、一个继承自IDisposable接口的类usingSystem;usingSystem.IO;classSample4GC:IDisposable{privatestringfilePath=string.Empty;privateFileStreamfs;publicSample4GC(){filePath=Path.Combine(AppDomain.CurrentDomain.BaseDirectory,"test.txt 阅读全文