private void UpdateObject(SoftwareVersion _newSoftwareVersion, ref SoftwareVersion _oldSoftwareVersion) { try { foreach (PropertyInfo SoftwareVersionPropInfo in _newSoftwareVersion.GetType().GetProperties().ToList()) { _oldSoftwareVersion.GetType().GetProperty(SoftwareVersionPropInfo.Name).SetValue(_oldSoftwareVersion, _newSoftwareVersion.GetType().GetProperty(SoftwareVersionPropInfo.Name).GetValue(_newSoftwareVersion)); } } catch (Exception e) { Console.WriteLine(e); throw; } }