The following example illustrates several different types of object expressions.
下面的示例阐释了几种不同类型的对象表达式。
You use object expressions when you want to avoid the extra code and overhead that is required to create a new, named type.
若要避免创建新的命名类型所需的额外代码和开销,可以使用对象表达式。
If you use object expressions to minimize the number of types created in a program, you can reduce the number of lines of code and prevent the unnecessary proliferation of types.
如果使用对象表达式来最小化程序中创建的类型数目,您可以减少代码行数,并防止出现不必要的类型增殖。
Object expressions, which enable you to define small objects implicitly in expressions as needed, instead of declaring a new type and instantiating an object.
物件运算式,可让您在需要时于运算式中隐含定义小型物件,而不用宣告新型别以及具现化物件。
Object expressions, which enable you to define small objects implicitly in expressions as needed, instead of declaring a new type and instantiating an object.
物件运算式,可让您在需要时于运算式中隐含定义小型物件,而不用宣告新型别以及具现化物件。
应用推荐