I help with reflection, follows the code below where I explain my need, within the foreach I want to get the public private name by name
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?
}