我帮助反思,按照下面的代码解释我的需要,在foreach中我希望按名称获取公共私人名称
class Test
{
private string _test;
public string Test
{
get { return _test; }
set { _test= value; }
}
}
foreach (PropertyInfo Prop in new Test().GetType().GetProperties())
{
Prop.Name = Name Public = Test
I Want Private Name = _test
How to do?
}