public void Copy(ActionType obj) { if (obj == null) return; // copy all of the properties foreach (PropertyInfo pi in this.GetType().GetProperties()) { var val = pi.GetValue(obj, null); pi.SetValue(this, val, null); } }
public ActionType(ActionType obj) { Copy(obj); }