public Test(Test other)//copy ctor { foreach (PropertyInfo property in other.GetType().GetRuntimeProperties()) { property.SetValue(this, property.GetValue(other)); } }
public Test(Test other) { foreach (PropertyInfo prop in other.GetType().GetRuntimeProperties()) { prop.SetValue(this, prop.GetValue(other)); } }
public Test(Test other) { foreach (PropertyInfo property in other.GetType().GetProperties()) { property.SetValue(this, property.GetValue(other)); } testProperties = new TestProperties(other.testProperties); }