下文代码是从网络(http://www.cnblogs.com/hayden/archive/2012/04/26/2472815.html)得来,亲测好用.我中修改了下格式和注释,版权属于原作者“舒启钊”. using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using System.Net; namespace ConsoleTest {
建议51:具有可释放字段的类型或拥有本机资源的类型应该是可释放的 在建议50中,我们将C#中的类型分为:普通类型和继承了IDisposable接口的非普通类型.非普通类型除了包含那些托管资源的类型外,本身还包含一个非普通类型的字段. 在标准的Dispose模式中,我们对非普通类型举了一个例子:一个非普通类型AnotherResource.由于AnotherResource是一个非普通类型,所以如果有一个类型,它组合了AnotherResource,那么他就应该继承IDisposable接口: c
官网介绍: (Aria2 is a light weight multi-protocol & multi-source command-line download utility. It supportsHTTP/HTTPS,FTP,SFTP,BitTorrent and Metalink.Aria2 can be manipulated via built-in JSON-RPC and XML-RPC interfaces.) 说白了就是一个命令行操作的轻量级下载工具(类似 迅雷),但不会