public void ToConfig(Config config) { foreach (var src in GetType().GetProperties()) { var dst = config.GetType().GetProperty(src.Name); dst?.SetValue(config, src.GetValue(this, null), null); } config.TitleHistory = WindowTitles.ToArray(); }
public void ToConfig(Config config) { foreach (var src in GetType().GetProperties()) { var dst = config.GetType().GetProperty(src.Name); dst?.SetValue(config, src.GetValue(this, null), null); } config.TitleHistory = WindowTitles.ToArray(); }