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

Is there a way to create anonymous structs in C#?

There doesn't seem to be any way as anonymous types derive from object. But I thought I'd ask since much …

c# anonymous-types struct
Objective-C equivalent to Java's anonymous classes in class methods

I want to set the delegate of an object inside a class method in Objective-C. Pseudo-code: + (ClassWithDelegate*) myStaticMethod { if (myObject == …

java objective-c delegates anonymous-types
C# anonymously implement interface (or abstract class)

In Java it is possible to extend an interface with an anonymous class that you can implement on the fly. …

c# anonymous-types
Storing an Anonymous Object in ViewBag

This is probably a silly question, but I am trying to stuff an anonymous object in ViewBag like so: ViewBag.…

c# asp.net-mvc-3 reflection anonymous-types viewbag
Anonymous Types in C#

// x is compiled as an int var x = 10; // y is compiled as a string var y = "Hello"; // z is compiled …

c# anonymous-types var
IQueryable for Anonymous Types

I use EntityFramework, I'm querying and returning partial data using Anonymous Types. Currently I'm using IQueryable<dynamic>, it …

c# linq iqueryable anonymous-types
Can I use Attributes with Anonymous classes?

I have a anonymous class: var someAnonymousClass = new { SomeInt = 25, SomeString = "Hello anonymous Classes!", SomeDate = DateTime.Now }; Is there anyway to …

c# attributes anonymous-types
Anonymous class initialization in VB.Net

i want to create an anonymous class in vb.net exactly like this: var data = new { total = totalPages, page = page, …

c# vb.net anonymous-types
Assigning property of anonymous type via anonymous method

I am new in the functional side of C#, sorry if the question is lame. Given the following WRONG code: …

c# lambda anonymous-types anonymous-methods
ExpandoObject, anonymous types and Razor

I want to use an ExpandoObject as the viewmodel for a Razor view of type ViewPage<dynamic>. I …

asp.net-mvc-3 dynamic razor anonymous-types expandoobject