NETT

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

随笔分类 -  C#

摘要:在c#中一个类的静态成员有静态变量和静态方法,这里首先介绍静态变量.首先说一下静态变量的特点:1.静态变量属于类,而不属于类的任何实例.(From MSDN:Use the static modifier to declare a static member, which belongs to the type itself rather than to a specific object.)2.... 阅读全文
posted @ 2010-05-19 23:49 nett 阅读(200) 评论(0) 推荐(1)

摘要:static constructor========================首先看一段代码:namespace Learning.Static{ class StaticTesting { static void Main(string[] args) { test t1 = new test(); test t2 = new test(); Console.WriteLine(test.... 阅读全文
posted @ 2010-05-08 08:53 nett 阅读(247) 评论(0) 推荐(0)