Top "Expandoobject" questions

ExpandoObject is a .NET type whose members can be added and removed at runtime.

Dynamically adding properties to an ExpandoObject

I would like to dynamically add properties to a ExpandoObject at runtime. So for example to add a string property …

c# c#-4.0 dynamic expandoobject
How to detect if a property exists on an ExpandoObject?

In javascript you can detect if a property is defined by using the undefined keyword: if( typeof data.myProperty == "undefined" ) ... …

c# dynamic expandoobject
How do I dynamically generate columns in a WPF DataGrid?

I am attempting to display the results of a query in a WPF datagrid. The ItemsSource type I am binding …

wpf dynamic datagrid expandoobject
How to flatten an ExpandoObject returned via JsonResult in asp.net mvc?

I really like the ExpandoObject while compiling a server-side dynamic object at runtime, but I am having trouble flattening this …

c# javascript asp.net-mvc json expandoobject
Differences between ExpandoObject, DynamicObject and dynamic

What are the differences between System.Dynamic.ExpandoObject, System.Dynamic.DynamicObject and dynamic? In which situations do you use these …

c# .net dynamic expandoobject dynamicobject
How to create a new unknown or dynamic/expando object in Python

In python how can we create a new object without having a predefined Class and later dynamically add properties to …

python oop class object expandoobject
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
Using LINQ, is it possible to output a dynamic object from a Select statement? If so, how?

Presently in LINQ, the following compiles and works just fine: var listOfFoo = myData.Select(x => new FooModel{ someProperty = x.…

c# .net dynamic duck-typing expandoobject
In C#, how do I remove a property from an ExpandoObject?

Say I have this object: dynamic foo = new ExpandoObject(); foo.bar = "fizz"; foo.bang = "buzz"; How would I remove foo.…

c# expandoobject
C# 4.0 Dynamic vs Expando... where do they fit?

I am trying to learn all the new goodies that come with C# 4.0. I am failing to understand the differences …

c#-4.0 expandoobject dynamicobject dynamic-keyword