不应在静态成员中引用封闭类型参数。
Enclosing type parameters should not be referred to inside static members.
不鼓励通过实例变量来使用静态成员。
Using a static member through an instance variable should be discouraged.
静态成员中的封闭类型参数。
静态成员不能在子类中被重新定义。
Static members and methods cannot be re-defined in subclasses.
静态成员的类定义存在不与任何对象。
Static members exists with the defining Class not with any object.
我在前面已经提到过,CLR不支持静态成员的继承。
As I alluded to earlier, the CLR does not support the inheritance of static members.
因此,应该将它们声明为此类的静态成员。
Therefore, they should be declared as static members of the class.
静态成员输入的对象吗?
哦,这是让人疲惫:静态成员不实施对象。
Oh man, this is getting tiring: Static members are NOT implemented in object.
对于静态成员和实例成员来说,都是正确的。
只包含静态成员。
为了说明静态成员,请看一个表示公司雇员的类。
To demonstrate static members, consider a class that represents a company employee.
如果静态成员是一个变量,然后你可以改变它的值。
If the Static member is a mutable variable, then you can certainly change it's value.
当提供静态成员变量时,总是提供一个静态构造函数。
Always provide a static constructor when providing static member variables.
这是最有可能丢失的支票为公共静态成员多线程访问。
It's most likely a missing check for multi thread access of the public static member.
什么时候使用带有静态成员的类,什么时候使用单例?
When would you use a class with static members and when would you use a Singleton class?
当一个对象被创建时,它接收的静态成员,能值被改变?
When an object is created, does it receive the static member, and can that value be changed?
您也不能从Static1派生,或者向该类添加任何非静态成员。
You also cannot derive from Static1, or add any non-static members to the class.
基本上,静态成员实施的对象如何,以及他们如何改变?
Basically, how are static members implemented in objects, and how do they change? And can they only be manipulated with static methods?
PHPV5.3提供一些特性来增强对类的静态成员和方法的支持。
PHP V5.3 has added several features to enhance the support for static members and methods within a class.
PHPV 5中的另一个重要的新功能是支持对类使用静态成员和方法。
Another important addition to PHP V5 is support for static members and methods on classes.
在本文结尾,您还会看到在应用程序中使用静态成员和静态类的最佳做法。
By the end of the article, you will come away with best prac-tices for the use of static members and static classes in your apps.
在创建一个类型的任何实例之前,应该初始化其中的静态成员变量。
You know that you should initialize static member variables in a type before you create any instances of that type.
需要注意的是,在重复自己的费用,静态成员与类关联的对象,不。
Note though, at the expense of repeating myself, that static members are associated with the Class, not the object.
如果你需要简单的分配一个静态成员,那么可以使用初始化器语法。
If you simply need to allocate a static member, use the initializer syntax.
然后,您可以将这些设置保存在类的静态成员中,以便后续的消息可以使用其值。
You can then store these Settings in static members of the class, making the value available to subsequent messages.
当你有更复杂的逻辑来初始化静态成员变量时,请创建静态构造函数。
When you have more complicated logic to initialize static member variables, create a static constructor.
使用P /调用的API函数,常量和结构的定义为静态成员的管理类。
Use P/Invoke to wrap the API functions, constants, and structure definitions as static members of a managed class.
系统在创建第一个类型实例或引用任何静态成员之前调用静态构造函数。
The system calls the static constructor before the first instance of the type is created or any static members are referenced.
在类型的静态成员上使用反射技术与在对象的实例成员上进行反射有一点小小的差别。
Using reflection techniques on static members of a type differs slightly from reflecting on instance members of an object.
应用推荐