匿名类型(anonymous type)是简化这个编程模型的一种方式,其理念是使用C#编译器根据要存储的数据自动创建类型,而不是定义简单的数据存储类型。如:
基于322个网页-相关网页
什么是匿名类型?
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的例子中,我们定义了一个匿名类型,没有明确地命名这个复杂类型。
应用推荐