日期:2014-05-17 浏览次数:20490 次
var htmlattr = new { @class = "a", style = "" };
Dictionary<string, string> dic = new Dictionary<string, string>();
foreach (System.Reflection.PropertyInfo p in htmlattr.GetType().GetProperties())
{
dic.Add(p.Name, p.GetValue(htmlattr,null).ToString());
}