Top "Anonymous-types" questions

Anonymous types are data types which dynamically add a set of properties into a single object without having to first explicitly define a type

A dictionary where value is an anonymous type in C#

Is it possible in C# to create a System.Collections.Generic.Dictionary<TKey, TValue> where TKey is unconditioned …

c# .net linq dictionary anonymous-types
How do I iterate over the properties of an anonymous object in C#?

I want to take an anonymous object as argument to a method, and then iterate over its properties to add …

c# properties iteration anonymous-types
Cast ExpandoObject to anonymous type

Can I cast ExpandoObject to anonymous type ? var anoObj = new { name = "testName", email = "testEmail" }; dynamic expandoObj = new System.Dynamic.ExpandoObject(); // …

c# generics anonymous-types expandoobject
EditorFor() and additionalViewData: how to add data in helper class?

EditorFor() can take an object additionalViewData parameter which the typical method to populate is something like: EditorFor(model => model.…

asp.net-mvc asp.net-mvc-3 views anonymous-types
How can I create temporary objects to pass around without explicitly creating a class?

I frequently find myself having a need to create a class as a container for some data. It only gets …

c# .net oop object anonymous-types
razor view with anonymous type model class. It is possible?

I want to create a view using razor template, but I do not want to write a class for model, …

c# asp.net-mvc asp.net-mvc-3 razor anonymous-types
Cannot assign null to anonymous property of type array

I have any array of (Pilot) objects with a (Hanger) property, which may be null, which itself has a (List&…

c# linq anonymous-types
Anonymous TABLE or VARRAY type in Oracle

In Oracle, I would sometimes like to create constructs such as these ones SELECT * FROM TABLE(STRINGS('a', 'b', 'c')) …

sql arrays oracle anonymous-types
Creating a list of Anonymous Type in VB

I'd like to create a list of an anonymous type, for example: Dim lineItem = New With {.Name = myFile(index).Last_…

.net vb.net linq list anonymous-types
Convert anonymous type to new C# 7 tuple type

The new version of C# is there, with the useful new feature Tuple Types: public IQueryable<T> Query&…

linq-to-entities tuples anonymous-types linq-to-nhibernate c#-7.0