07 2016 档案
c#深拷贝
摘要:下面是 StackOverflow 上的一个回答: Notes:Your class MUST be marked as [Serializable] in order for this to work.Your source file must include the following code 阅读全文
posted @ 2016-07-08 16:29 武胜-阿伟 阅读(378) 评论(0) 推荐(0)
MEF load plugin from directory
摘要:var catalog = new AggregateCatalog(); catalog.Catalogs.Add(new DirectoryCatalog(".")); var container = new CompositionContainer(catalog); var catalog 阅读全文
posted @ 2016-07-03 20:49 武胜-阿伟 阅读(234) 评论(1) 推荐(0)
C# 文件操作 把文件读取到字节数组
摘要:string zipfile = "c:\\a.zip"; //方法1 FileStream fs = new FileStream(zipfile, FileMode.Open); //把文件读取到字节数组 byte[] zipdata = new byte[fs.Length]; fs.Read 阅读全文
posted @ 2016-07-03 20:09 武胜-阿伟 阅读(1332) 评论(0) 推荐(0)