Initialize Static Class Members with Static Constructors.
使用静态构造器初始化静态类成员。
This static class helps to make mocking a lot easier in ASP.NET MVC applications.
不过该静态类有助于开发者更加方便地在ASP.NETMVC应用程序中创建模拟对象。
A non-static class can contain static methods, fields, properties, or events.
非静态类别能包含静态方法、栏位、属性或事件。
Note also that it's an error to derive a static class from any class other than object.
还要注意,从任何非对象类派生静态类都是错误的。
You cannot declare a variable of type Static1 because it is marked as a static class.
您不能声明Static 1类型的变量,因为它被标记为静态类。
Over the years, we found that the early static class is one of the many learned into gold.
多年来,我们发现静初是众多进级者学习的金矿。
This class is a static class - it is sealed, abstract and does not have a public constructor.
此类是一个静态类。即,它既是密封的,又是抽象的,并且没有公共构造函数。
As per comments, Globals appears to be a static class, therefore it itself is not serializable.
根据评论,Globals似乎是一个静态类,因此它本身是不可序列化的。
If the nested class is a static class, a box showing a preview of the refactoring displays right away.
如果这个嵌套类是一个静态类,那么就会立即出现一个框,显示这个重构的预览。
In this way, a single static class declares the entire extended authorization policy of an EAz application.
通过这种方法,单个静态类可以声明EAz应用程序的完整扩展授权策略。
You use a static class that has methods that run before and after the XmlObject changes, as shown in Listing 3.
我们使用一个静态类,其中包含在XmlObject更改之前和之后运行的方法,见清单3。
Because there is no instance variable, you access the members of a static class by using the class name itself.
由于没有执行个体变数,您要使用类别名称本身存取静态类别的成员。
It is more typical to declare a non-static class with some static members, than to declare an entire class as static.
比起将整个类别宣告为静态,以一些静态成员宣告非静态类别是较典型的方法。
In our example, the identifier is stored in a static class variable so that it can be accessed from outside if necessary.
在我们的范例之中,标识符存储在静态的类变量之中,这样如有需要就可以从外边访问它了。
Static class methods may support a different level of thread safety than those associated with an instance of that class.
和实例的方法相比,静态类的方法或多或少拥有更高的线程安全性。
You're actually building the static class model, even though you're drawing dynamic model (sequence) diagrams at the same time.
虽然画动态(时序)图实际上也是在创建静态类模型。
The advantage of using a static class is that the compiler can check to make sure that no instance members are accidentally added.
使用静态类别的好处是,编译器可进行检查,确定不会在不小心的情况下加入执行个体成员。
With singletons implemented as single instances instead of static class members, you can initialize the singleton lazily, creating it only when it is first used.
由于单例对象作为实例存在而不是类的静态成员,所以你能够惰性地初始化单例对象,即只需要在第一次用它的时候才去创建它。
A static class is an Ada package that contains only static attributes and operations and this construct is supported for code generation, reverse engineering and animation.
静态类就是一个包含静态属性和操作的ada包,而且这种结构得到了代码生成、逆向工程的支持。
If it is not a static class, you first need to declare the name of the field that will hold the reference to the parent class of the nested class before you get to the preview box.
如果它不是一个静态类,那么需要首先声明保存有对此嵌套类的父类的引用的那个字段的名称,之后才能看到这个预览框。
A link demand performed on a static class constructor does not protect the constructor because static constructors are called by the system, outside the application's code execution path.
对静态类构造函数执行的链接要求不会保护该构造函数,因为静态构造函数是由系统调用的,它们并不包括在应用程序的代码执行路径中。
You can then store these Settings in static members of the class, making the value available to subsequent messages.
然后,您可以将这些设置保存在类的静态成员中,以便后续的消息可以使用其值。
Various fonts are declared as static constants in this class.
各种字体都在这个类中声明为静态常数。
We start with a static method (independent of the class) for setting the user's services in the cache.
首先解释用来在缓存中设置用户服务的静态方法(不依赖于类)。
AOT code must therefore be generated with every static, field, class, and method reference unresolved.
AOT代码因此必须在没有解析每个静态、字段、类和方法引用的情况下生成。
In this article, you've seen some performance consequences when a class has a static constructor.
在本文中,您已经看到了在类具有一个静态构造函数时所导致的性能结果。
Figure 5 presents the class diagram for the static view of the domain level.
图5展示了域层次静态视图的类关系图。
If you want to maintain a single instance of a variable for all instances of a class, you will use static-class member variables to do it.
如果您想为一个类的所有实例维持一个变量的实例,将会用到静态类成员变量。
The second static field holds the Class of the PersonLocalHome interface.
第二个静态字段包括了PersonLocalHome接口的类。
In this article, I looked at late static binding, namespace support, class method overloading, and heredoc support.
在本文中,我讨论了延迟静态绑定、名称空间支持、类方法重载和heredoc支持。
应用推荐