摘要:在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....
阅读全文
随笔分类 - 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....
阅读全文
摘要:static constructor========================首先看一段代码:namespace Learning.Static{ class StaticTesting { static void Main(string[] args) { test t1 = new test(); test t2 = new test(); Console.WriteLine(test....
阅读全文
|