using System.Collections; namespace FreeTubeSync.Model; public class BaseModel { public void UpdateFrom(object other) { foreach (var prop in other.GetType().GetProperties()) { if (prop.Name == "_id" || prop.Name == "id" || prop.Name == "Id" || prop.Name == "subscriptions" || prop.Name == "videos") continue; var val = prop.GetValue(other); prop.SetValue(this, val); } } }