expandoobject Questions

2

Solved

I am using Dapper to fetch a 2 column resultset into a dictionary. I noticed that intellisense shows me a .ToDictionary() when I hover over the resultset but I cannot get it to work since dapper us...
Luthern asked 19/10, 2011 at 17:29

4

Solved

I want to use an ExpandoObject as the viewmodel for a Razor view of type ViewPage<dynamic>. I get an error when I do this ExpandoObject o = new ExpandoObject(); o.stuff = new { Foo = "bar" }...

1

Solved

Is it possible to get the ServiceStack JsonSerializer to serialize an ExpandoObject as a flat object rather than a dictionary? Something roughly approximate to this: {"x":"xvalue","y":"\/Date(1313...
Bainbridge asked 21/8, 2011 at 23:12

5

Solved

just exploring c# 4. Trying to get my head around all this dynamic stuff. Sorry if this question is silly, no experience in this domain. If I have an ExpandoObject and want to add public propertie...
Sikorski asked 4/6, 2010 at 12:22

1

Solved

I'm trying to use an ExpandoObject as the SelectedObject of a PropertyGrid. I know how to add the properties I want to the ExpandoObject: public dynamic MakePropertyObject() { dynamic expando = n...
Sunbeam asked 23/4, 2011 at 20:37

3

Solved

I'm trying to use a System.Dynamic.ExpandoObject so I can dynamically create properties at runtime. Later, I need to pass an instance of this object and the mechanism used requires serialization. ...
Hayashi asked 31/1, 2011 at 16:48

1

Solved

Normally, we can create properties like this, dynamic expando = new ExpandoObject(); expando.Price = 45k; expando.Value = "Good"; In my case, I won't know the properties such as "Price" or "Valu...
Shanika asked 15/3, 2011 at 11:7

2

Solved

Is there any way in .net to bind a dictionary of properties to an instance at runtime, i.e., as if the base object class had a property like: public IDictionary Items { get; } I have come up wit...
Chiao asked 5/3, 2011 at 14:27

1

Solved

When I try to databind an ASP.NET GridView to an IEnumerable<ExpandoObject> using an ObjectDataSource, I get the following exception. System.Web.HttpException (0x80004005): DataBinding: 'S...
Voracious asked 19/1, 2011 at 21:27

4

Solved

I am try to add a dynamic method to ExpandoObject which would return the properties (added dynamically) to it, however it's always giving me error. Is something wrong I am doing here? using Syste...
Lobbyism asked 27/12, 2010 at 7:9

2

Solved

UPDATE The problem is not the code, the problem is that you apparently can't evaluate dynamic objects from the immediate window. I'm trying to tack on methods to an ExpandoObject but not sure ho...
Dunkle asked 16/9, 2010 at 14:15

3

Solved

Is there any way to use the new dynamic features in the 4.0 framework like ExpandoObject in VB.NET without setting Option Strict Off? With C#, you lose type safety only with the variables you speci...
Werby asked 22/7, 2010 at 2:6

1

Solved

I am trying to learn all the new goodies that come with C# 4.0. I am failing to understand the differences between the DynamicObject and ExpandoObject types. It seems like DynamicObject is used e.g...
Mullein asked 22/8, 2010 at 4:32

3

Solved

A rather simple question really. I'm working on a project where I need to store and retrieve property values dynamically from a kind of context storage. The values will be written now and then and ...
Recrudesce asked 19/8, 2010 at 14:8

1

Solved

I have written a nifty function that will accept a system.object, reflect on its properties and serialize the object into a JSON string. It looks like this: public class JSONSerializer { public ...
Spitzer asked 9/6, 2010 at 10:27

1

Solved

Does C# 4.0's ExpandoObject support Prototype-based inheritance? If not, why not (was it by design?) and how could this be implemented? If yes, how does it work and what differences are there compa...
Hanshansard asked 31/5, 2010 at 10:4

© 2022 - 2024 — McMap. All rights reserved.