Question

I know viewbag is one of the ready-to-use DynamicObject, but if you are not in a view or controller, is there any other Ready-to-use DynamicObject except to write your own?

(btw, I found a sample of a great implement http://www.codeproject.com/KB/cs/dynamicincsharp.aspx )

I am really lazy and just want to use some already made DynamicObject.

Was it helpful?

Solution

Have a look at the ExpandoObject Class.

ExpandoObject Class

Represents an object whose members can be dynamically added and removed at run time.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top