We are using DynamicObject for dynamic properties creation, but then we want to use PropertyGrid to show this properties and edit them.
Firstly, I found this article, and this one. I try to use second article code, but in more generic fashion, basically to replace all methods names constants with variables. But the problem is that VS2010 can’t find CSharpGetMemberBinder type.
Does someone know how to replace it? or what is the best approach?
Instead of using that article’s Helper class (which is outdated), you can simply cast to IDictionary and set / retrieve the values:
Edit: This may only work in the case of ExpandoObjects, which was what the article was using.. if you created your own dynamic class with a different backing, you may need to change this.