質問

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.

役に立ちましたか?

解決

Have a look at the ExpandoObject Class.

ExpandoObject Class

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

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top