日期:2014-05-18 浏览次数:20982 次
GeomParas p = new GeomParas();
p.GetType().GetProperty("aaa").SetValue(p, 100f, null);
------解决方案--------------------
GeomParas ob=....;
---------------------------
Type t=typeof(GeomParas);
PropertyInfo pi=t.GetProperty("aaa",BindingFlags.Instance | BindingFlags.Public);
pi.SetValue(obj,10,null);