我找到了这个话题,它谈了一下:Is it possible to add attributes to the generated members of an ExpandoObject instance?
但似乎只关注powergrid。
我花了大约1个小时在谷歌上寻找这个没有任何运气。任何人都可以至少确认是否可以做到吗?。
答案 0 :(得分:2)
您可以创建一个界面并将属性添加到界面。
比使用Improptu:http://code.google.com/p/impromptu-interface/
IMyInterface instance = Impromptu.ActLike<IMyInferface>(myexpando);