• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
4℃空间
众人笑我痴 我笑他人看不懂
   首页    新随笔    联系   管理    订阅  订阅

随笔分类 -  C# Nutshell

知识来源:http://www.albahari.com/nutshell/code.aspx
Disposal and Garbage Collection(资源释放处理与垃圾回收)

摘要:来源地址:http://www.albahari.com/nutshell/cs4ch12.aspxCalling Dispose from a finalizer(采用完成执行后的释放,也就是析构函数):class Test : IDisposable{ public void Dispose() // NOT virtual(非虚函数) { Dispose (true); GC.SuppressFinalize (this); // Prevent finalizer from running.(在执行过程中防止调用最终的资源释放函数) }... 阅读全文
posted @ 2012-03-08 09:20 magic_evan 阅读(1149) 评论(2) 推荐(0)
c#4.0 Other XML Technologies(一些XML的知识点)

摘要:URI:http://www.albahari.com/nutshell/cs4ch11.aspxEnumerating nodes with XmlReader使用XmlReader阅读器来对节点进行枚举读取<?xml version="1.0" encoding="utf-8" standalone="yes"?><customer id="123" status="archived"> <firstname>Jim</firstname> & 阅读全文
posted @ 2011-12-29 15:58 magic_evan 阅读(382) 评论(0) 推荐(0)
C#4.0 Collections【集合】

摘要:URI:http://www.albahari.com/nutshell/cs4ch07.aspx集合:Implementing IEnumerable<T> with an iterator(实现IEnumerable<T>的迭代器):public class MyGenCollection : IEnumerable<int>{ int[] data = {1, 2, 3}; public IEnumerator<int> GetEnumerator() { foreach (int i in data) yield return i; } 阅读全文
posted @ 2011-12-20 15:19 magic_evan 阅读(284) 评论(0) 推荐(0)

博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3