C#用户空间的Dispose方法重写

#region Dispose
        /// <summary> 
        /// 清理所有正在使用的资源。
        /// </summary>
        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);

            LogUtil.LogInfo("坐席程序关闭");
            
        }
        #endregion

  

base.Dispose(disposing);以及以上是系统资源的释放。
下面是应该处理相关业务所需资源。
posted @ 2013-03-08 16:26  lixq0203  阅读(3673)  评论(0编辑  收藏  举报