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

How to return anonymous type from c# method that uses LINQ to SQL

Possible Duplicate: LINQ to SQL: Return anonymous type? I have a standard LINQ to SQL query, which returns the data …

c# linq linq-to-sql anonymous-types
Convert Dictionary<string, object> To Anonymous Object?

First, and to make things clearer I'll explain my scenario from the top: I have a method which has the …

c# .net dictionary anonymous-types
Anonymous type result from sql query execution entity framework

I am using entity framework 5.0 with .net framework 4.0 code first approach. Now i know that i can run raw sql …

c# sql entity-framework anonymous-types
C# and arrays of anonymous objects

What does such an expression mean? obj.DataSource = new[] { new {Text = "Silverlight", Count = 10, Link="/Tags/Silverlight" }, new {Text = "IIS 7", Count = 11, …

c# asp.net .net arrays anonymous-types
Convert anonymous type to class

I got an anonymous type inside a List anBook: var anBook=new []{ new {Code=10, Book ="Harry Potter"}, new {Code=11, Book="…

c# linq anonymous-types
Dynamic Anonymous type in Razor causes RuntimeBinderException

I'm getting the following error: 'object' does not contain a definition for 'RatingName' When you look at the anonymous dynamic …

dynamic asp.net-mvc-3 razor anonymous-types
Is there a way to return Anonymous Type from method?

I know I can't write a method like: public var MyMethod() { return new{ Property1 = "test", Property2="test"}; } I can do …

c# .net anonymous-types
Cast to Anonymous Type

I had the following problem today, and I was wondering if there is a solution for my problem. My idea …

c# anonymous-types anonymous-class
Is there a trick in creating a generic list of anonymous type?

Sometimes i need to use a Tuple, for example i have list of tanks and their target tanks (they chase …

c# generics anonymous-types
How can I get a value of a property from an anonymous type?

I have a datagrid populated by a Linq query. When the focused row in the datagrid changes I need to …

c# .net anonymous-types