initializers

initializers

1. C# lets you use static initializers and a static constructor for this purpose.

C#允许使用静态初始化器和静态构造函数来达到目的。

2. C#'s constructor initializers provide a better alternative.

C#的构造函数初始化器提供了更好的改变。

3. The C# compiler recognizes the constructor initializer as special syntax and removes the duplicated variable initializers and the duplicated base class constructor calls.

C#编译器认出该构造函数初始化器是一个特殊的语法,会移除重复的变量初始化器和重复的基类构造函数调用。

4. Form of initialization that places a comma-separated list of initializers inside a pair of parentheses.

一种初始化形式,将逗号分隔的初始化式列表放在圆括号内。

5. The difference is that the compiler does not generate multiple calls to the base class constructor, nor does it copy the instance variable initializers into each constructor body.

不同之处在于编译器不生成对基类构造函数的多个调用,也不会将实例变量初始化器拷贝到每个构造函数体中。

6. 1207 The this keyword can not be used in property initializers.

不能在属性初始值设定项内部使用 this 关键字。

7. It is also possible to use initializers to fill the array elements with values, in which case you do not need the array size.

也可以使用初始值设定项用值填充数组元素,在这种情况下不需要数组大小。

8. Still don't buy the case for constructor initializers?

仍然出无购解构函数初初化器的帐?

9. Use initializers to initialize simple resources.

使用初初化器闭于繁单资流进行初初化。

10. Field initializers are not allowed on instance fields in value types.

值类型中的实例字段上不允许字段初始值设定项。

11. Keyword on a class or interface, all code in the class, including initializers and code in nested types, will be evaluated strictly.

关键字时,该类中的所有代码,包括嵌套类型中的初始设定值和代码,都将严格地进行计算。

12. Initializers are more than a convenient shortcut for statements in a constructor body.

初始化器不仅仅是构造函数体里面表达式的一个便捷的快捷方式。

13. The initializers are executed before each constructor you make for your type.

初始化器在每个构造函数之前被执行。

14. Ask a potenti employ to introduc you to your futur co-work either on the initi or secondari interview.

初次面试或再次面试中请雇佣者给你介绍一下未来的同事。

15. Prefer Variable Initializers to Assignment Statements。

变量声明时初始化优于赋值语句。

16. Collection initializers are only allowed for collection classes that meet certain criteria.

只允许对满足某些条件的集合类使用集合初始值设定项。

17. Subsequent instances of the same type start at step 5 because the class initializers execute only once.

同一类型的后续实例从第5步开始,因为类初始化器仅仅执行一次。

18. Also, steps 6 and 7 are optimized so that constructor initializers cause the compiler to remove duplicate instructions.

同时,第6步和第7步被进行了劣化,那样的话,解构器初初化器会让编译器移除沉单的指令。

19. Equally important, the initializers are added to the compiler-generated default constructor.

同样重要的是,初始化器被加到了编译器生成的默认构造函数中。

20. As with instance initializers, the static initializers are called before any static constructors are called. And, yes, your static initializers execute before the base class's static constructor.

和实例初始化器一样,静态初始化器在任何静态构造函数被调用之前被调用。同时,静态初始化器在基类的静态构造函数之前被执行。当你的类型初次被加载到应用程序空间时,

21. The statements generated by initializers are placed in object code before the body of your constructors.

在对象代码里面,初始化器生成的表达式,放置在构造函数体的前面。

22. Variable initializers are the simplest way to ensure that the member variables in your type are initialized regardless of which constructor is called.

在忽略哪个构造函数被调用的情况下,为了保证类型内部的成员变量都能被初始化,使用变量初始化器是最简单的方法。

23. Use initializers when all constructors create the member variable the same way; it's simpler to read and easier to maintain.

在所有的构造函数使用同样的方式创建成员变量的时候,使用初始化器,更加易读,更加容易维护。

24. Re. This is simple, if you don't require any special processing, but I think it's a little prettier to avoid including code in data-structure initializers.

如果你不需要任何的特别处理,这很简单。但是我认为避免在数据结构的初始化中包含代码,要稍微漂亮一些。

25. This is simple, if you don't require any special processing, but I think it's a little prettier to avoid including code in data-structure initializers.

如果你不需要任何的特别处理,这很简单。但是我认为避免在数据结构的初始化中包含代码,要稍微漂亮一些。

26. It is an error to have too many initializers.

如果初始化表达式的个数比数组元素数多,则是错误的。

27. If the local variable declaration includes multiple declarators, the initializers must all have the same compile-time type.

如果局部变量声明包含了多个声明符,这些声明符必须具备同样的编译期类型。

28. 4、If the local variable declaration includes multiple declarators, the initializers must all have the same compile-time type.

如果局部变量声明包含了多个声明符,这些声明符必须具备同样的编译期类型。

29. If we provide no element initializers for an array of class type, then the default constructor is used to initialize each element.

如果没有为类类型数组提供元素初始化式,则将用默认构造函数初始化每个元素。

30. If we do not supply element initializers, then the elements are initialized in the same way that variables are initialized ( Section 2.3.4, p. 50).

如果没有显式提供元素初值,则数组元素会像普通变量一样初始化(第2.3.4节):

31. If the dimension size is greater than the number of listed elements, the initializers are used for the first elements.

如果维数大于列出的元素初值个数,则只初始化前面的数组元素;

32. Object initializers basically allow the assignment of multiple properties or fields in a single expression.

对象初始值主要允许在单一表达式中为多个属性或字段赋值。

33. Object initializers, which ease construction and initialization of objects.

对象初始化器,简化了对象的构造和初始化。

34. An object initializer consists of a sequence of member initializers, enclosed by { and } tokens and separated by commas.

对象初始化器由一系列成员初始化器组成,封闭于{和}标记内并且由逗号间隔。

35. The laziness of type initializers is only guaranteed by .NET when the type isn't marked with a special flag called beforefieldinit.

当没有设定一个叫在某字段之前初始化的特殊标识下,类的延迟初始化只能由.Net来决定。

36. By routinely using constructor initializers, we can avoid being surprised by compile-time errors when we have a class with a member that requires a constructor initializer.

当类成员需要使用初始化列表时,通过常规地使用构造函数初始化列表,就可以避免发生编译时错误。

37. Execute the explicit instance variable initializers.

执行明确的物件变数初始化.

38. 4 Execute the explicit instance variable initializers.

执行明确的物件变数初始化。

39. It is a good idea to write constructor initializers in the same order as the members are declared. Moreover, when possible, avoid using members to initialize other members.

按照与成员声明一致的次序编写构造函数初始化列表是个好主意。此外,尽可能避免使用成员来初始化其他成员。

40. Finally, if your persistent object acquires any resources upon instantiation (eg. in initializers or default constructor), then those resources will also be acquired by the proxy.

最后,如果你的持久化对象在实例化时需要某些资源(如,在实例化方法、默认构造方法中),那么代理对象也同样需要使用这些资源。

41. Minimize reliance of implicit initializers for fields.

最小化对在域中的暗藏的初始化的信任。

42. The compiler generates code at the beginning of each constructor to execute all the initializers you have defined for your instance member variables.

每个构造函数中一开始执行你定义的所有初始化,编译器就会为所有的实例成员变量生成了代码。

43. However, if we provide explicit element initializers using the normal brace-enclosed array initialization list ( Section 4.1.1, p. 111), then each element is initialized using copy-initialization.

然而,如果使用常规的花括号括住的数组初始化列表(第4.1.1节)来提供显式元素初始化式,则使用复制初始化来初始化每个元素。

44. Initializers can also be included in the declarations.

申明的同时也可以初始化。

45. Structure variable declarations cannot specify initializers or initial sizes for arrays; class variable declarations can.

结构变量声明不能指定初始值设定项或数组初始大小,而类变量声明可以。

46. The results indicate that the final product is composed of CaCO 3 spherical particles,corrn-shape whiskers and smooth whiskers under higher initi al CaO/MgCl 2 molar ratio.

结果表明,在较高的初始氧化钙与氯化镁摩尔比下,所得粉体由碳酸钙球形粒子、玉米棒状晶须和少量光滑晶须构成。

47. Discusses object initializers, which are used to create instances of named and anonymous types by using a single expression.

讨论对象初始值设定项,通过使用单个表达式,可以利用这些初始值设定项来创建命名和匿名类型的实例。

48. ... In contexts where comma is given a special meaning, for example in lists of function arguments and lists of initializers, the required syntactic unit is an assignment expression, so ...

这几句话从一个侧面表现出,在某些特定的场合下逗号有特殊含义,比如函数参数列表、初始化列表等等,这时候需要加上一个括号以便区别。例如,

49. You'll get the benefits of avoiding code duplication, and constructor initializers generate much more efficient object code.

这样做的好处有:避免代码重复、构造函数初始化器生成更高效的对象代码。

50. Ordinarily these initializers are used to initialize the data members of the newly created object.

通常,这些初始化式会用于初始化新创建对象的数据成员。

51. Unless we explicitly supply element initializers, the elements of a local array of built-in type are uninitialized.

除非显式地提供元素初值,否则内置类型的局部数组的元素没有初始化。

52. Implicitly typed array creation expressions can be combined with anonymous object initializers to create anonymously typed data structures. For example

隐型数组创建表达式可以与匿名对象初始化器结合使用来创建匿名类型的数据结构。

53. Static initializers and static constructors provide the cleanest, clearest way to initialize static members of your class.

静态初始化器和静态构造函数提供了最洁净的、最直接的方式来初始化类的静态成员。

英语宝典
考试词汇表