摘要:
特性(attribute)是被指定给某一声明的一则附加的声明性信息。在C#中,有一个小的预定义特性集合。在学习如何建立我们自己的定制特性(custom attributes)之前,我们先来看看在我们的代码中如何使用预定义特性。using System;public class AnyClass{ [Obsolete("Don't use Old method, use New method", true)] static void Old( ) { } static void New( ) { } public static void Main( ) { ... 阅读全文
posted @ 2011-11-24 10:54
指尖流淌
阅读(449)
评论(0)
推荐(0)

浙公网安备 33010602011771号