07 2008 档案

摘要:特性(attribute)是被指定给某一声明的一则附加的声明性信息。 在C#中,有一个小的预定义特性集合。在学习如何建立我们自己的定制特性(custom attributes)之前,我们先来看看在我们的代码中如何使用预定义特性。 using System; public class AnyClass { [Obsolete("Don't use Old method, use N... 阅读全文
posted @ 2008-07-24 10:48 mark_xue 阅读(487) 评论(1) 推荐(0)
摘要:在System.Windows.Form命名空间里有一个类 Applicaiton 的实例. Applicaiton.Product 就是一个string 类型的程序名。 Application.ProductVersion 是一个string 类型的版本号。 阅读全文
posted @ 2008-07-21 15:44 mark_xue 阅读(631) 评论(0) 推荐(0)
摘要:得到函数名: System.Diagnostics.StackTrace st = new System.Diagnostics.StackTrace(); this.Text = st.GetFrame(0).ToString(); 得到代码行,源代码文件名: StackTrace st = new StackTrace(new StackFrame(true)... 阅读全文
posted @ 2008-07-21 14:01 mark_xue 阅读(1223) 评论(0) 推荐(0)
摘要:1. 概述 上篇,我对 Enterprise Library 自定义应用程序块的运行时编写进行了描述,在此我们将学习如何编写自定义应用程序块的设计时,以支持 Enterprise Library 配置控制台的使用。编写设计时包括四个部分:定义配置所对应的节点类、配置节点与配置文件 XML 间的序列化和反序列化类、Enterprise Library 配置控制台 UI 注册类和配置控制台的执行注册。... 阅读全文
posted @ 2008-07-17 10:03 mark_xue 阅读(205) 评论(0) 推荐(0)