We followed these steps to transform listing 1's anonymous type into listing 2's named type.
按照以下步骤,将清单1中的匿名类型转换为清单2中的命名类型。
In the example in Listing 8, we have defined what is called an anonymous type, where no explicit name is given to the complex type.
在清单8的例子中,我们定义了一个匿名类型,没有明确地命名这个复杂类型。
The complexType within the element named "person" has no name itself, so it is anonymous. You can convert this anonymous type into a named type by following these simple steps
名为 “person” 的元素中的 complexType本身没有名称,因此它是匿名的。
For an anonymous type, the binder has to be aware of its enclosing element; therefore, SOAPElement, that is returned from serialize method, has the same QName as that of the enclosing element.
对于匿名类型,绑定必须知道它的封装元素,因此,序列方法返回的SOAPElement与封装元素具有同样的QName。
An anonymous type is constructed by the compiler and the type name is only available to the compiler.
匿名型别是由编译器所建构,只有编译器才知道型别名称。
The name of the anonymous type is compiler generated, and it may vary from compilation to compilation.
匿名类型的名称由编译器生成,并可能随编译的不同而不同。
Provides an example of how to return the results of a LINQ query as a specific type instead of as an anonymous type.
提供有关如何将LINQ查询的结果作为特定类型而非匿名类型返回的示例。
Your code should not use or rely on the name of an anonymous type because the name might change when a project is recompiled.
代码不应使用或依赖匿名类型的名称,因为重新编译项目时该名称可能更改。
If you must store your query results or pass them outside the method boundary, consider using an ordinary named struct or class instead of an anonymous type.
如果您必须在方法界限外储存或传递查询结果,请考虑使用一般的具名结构或类别,而不使用匿名型别。
If you do not specify member names in the anonymous type, the compiler gives the anonymous type members the same name as the property being used to initialize them.
如果您未指定匿名型别中的成员名称,编译器会提供匿名型别成员与要对其进行初始化之属性相同的名称。
The format you use to declare an instance of an anonymous type resembles the format you use when you declare an instance of a named type by using an object initializer.
用于声明匿名类型实例的格式类似于在使用对象初始值设定项声明命名类型实例时使用的格式。
The format you use to declare an instance of an anonymous type resembles the format you use when you declare an instance of a named type by using an object initializer.
用于声明匿名类型实例的格式类似于在使用对象初始值设定项声明命名类型实例时使用的格式。
应用推荐