Я не уверен, что это возможно, но я хочу выполнить итерацию через класс и установить свойство члена поля, явно не ссылаясь на объект поля:
public class Employee
{
  public Person _person = new Person();
  public void DynamicallySetPersonProperty()
  {
    MemberInfo[] members = this.GetType().GetMembers();
    foreach (MemberInfo member in members.Where(a => a.Name == "_person"))
    //get the _person field
    {
      Type type = member.GetType();
      PropertyInfo prop = type.GetProperty("Name"); //good, this works, now to set a value for it
      //this line does not work - the error is "property set method not found"
      prop.SetValue(member, "new name", null);
    }
  }
}
public class Person
{
  public string Name { get; set; }
}
В ответе, который я обозначил как ответ, вам нужно добавить:
  public static bool IsNullOrEmpty(this string source)
  {
    return (source == null || source.Length > 0) ? true : false;
  }