我想要检索的PropertyInfo,下面的代码:如何获得嵌套属性
string propertyName="Text";
PropertyInfo pi = control.GetType().GetProperty(propertyName);
它工作正常,但如果我想要检索嵌套属性,它返回null:
string propertyName="DisplayLayout.Override.RowSelectors";
PropertyInfo pi = control.GetType().GetProperty(propertyName);
是有没有办法获得嵌套的属性?
最好的问候,
弗洛里安
编辑:我现在有一个新的问题,我希望得到一个属性,它是一个数组:
string propertyName="DisplayLayout.Bands[0].Columns";
PropertyInfo pi = control.GetType().GetProperty(propertyName)
谢谢
谢谢! 我想知道如何通过一个指标得到一个属性: string propertyName =“DisplayLayout.Bands [0] .Columns”; PropertyInfo pi = control.GetType()。GetProperty(propertyName); – Florian 2010-06-25 07:33:59