Anonymous types are a feature of the C# 3.0, Visual Basic . NET 9.0, and Oxygene that allows data types to encapsulate a set of properties into a single object without having to first explicitly define a type. This is an important feature for the SQL-like LINQ feature that is integrated into C# and VB. net. Since anonymous types do not have a named typing, they must be stored in variables declared using the var keyword, telling the C# compiler to use type inference for the variable.

PropertyValue
dbpprop:abstract
  • Anonymous types are a feature of the C# 3.0, Visual Basic . NET 9.0, and Oxygene that allows data types to encapsulate a set of properties into a single object without having to first explicitly define a type. This is an important feature for the SQL-like LINQ feature that is integrated into C# and VB. net. Since anonymous types do not have a named typing, they must be stored in variables declared using the var keyword, telling the C# compiler to use type inference for the variable. The properties created are read-only in C#, however they are read-write in VB. net. This feature should not be confused with dynamic typing. While anonymous types allow programmers to define fields seemingly "on the fly", they are still static entities. Type checking is done at compile time, and attempting to access a nonexistent field will cause a compiler error. This gives programmers much of the convenience of a dynamic language, with the type safety of a statically typed language.
  • Los tipos anónimos son una característica del lenguaje de programación C# 3.0 que permite crear implícitamente campos con nombre desde el código que lo requiere. Esta es una importante característica para el Lenguaje integrado de consultas LINQ integrado en C# 3.0. Como los tipos anónimos no tiene un tipo de dato con nombre, deben ser almacenados en variables declaradas usando la palabra reservada var, que le indica al compilador que use inferencia de tipos para la variable. Está característica no debe ser confundida con los tipos dinámicos. Mientras los tipos anónimos permiten a los programadores definir campos aparentemente "sobre la marcha", estos son aun entidades estáticas. La verificación de los tipos es hecha durante la compilación, y el intento de acceso a un campo no existente causara un error de compilación. Esto da a los programadores las ventajas de los lenguajes dinámicos, con la seguridad de tipos de un lenguaje estático.
dbpprop:hasPhotoCollection
dbpprop:reference
rdf:type
rdfs:comment
  • Anonymous types are a feature of the C# 3.0, Visual Basic . NET 9.0, and Oxygene that allows data types to encapsulate a set of properties into a single object without having to first explicitly define a type. This is an important feature for the SQL-like LINQ feature that is integrated into C# and VB. net. Since anonymous types do not have a named typing, they must be stored in variables declared using the var keyword, telling the C# compiler to use type inference for the variable.
  • Los tipos anónimos son una característica del lenguaje de programación C# 3.0 que permite crear implícitamente campos con nombre desde el código que lo requiere. Esta es una importante característica para el Lenguaje integrado de consultas LINQ integrado en C# 3.0. Como los tipos anónimos no tiene un tipo de dato con nombre, deben ser almacenados en variables declaradas usando la palabra reservada var, que le indica al compilador que use inferencia de tipos para la variable.
rdfs:label
  • Anonymous type
  • Tipos anónimos
owl:sameAs
skos:subject
foaf:page
is owl:sameAs of