2
我有一本字典轉換字典匿名對象
Dictionary<string, object> dict;
而且我通過鍵入
string foo = dict["foo"].ToString();
本詞典是一個序列化JSON結果從它那裏得到的值。
serializer.Deserialize<Dictionary<string, object>>(HttpContext.Current.Request["JSON"]);
什麼,我想知道,如果thers的方式將其轉換爲一個對象,這樣我就可以輸入類似:
string foo = dict.foo;
感謝
該框架確實存在並被稱爲[Automapper](http://automapper.org/) – 2011-12-29 11:52:58