public void UpdateDOOdds(RunnerOdd odds, bool updateBF = false) { PropertyInfo[] ps = odds.GetType().GetProperties().Where(p => p.Name.StartsWith("Odds") && (!p.Name.Contains("BF") || updateBF)).ToArray(); foreach (PropertyInfo p in ps) { if (p.GetValue(this, null) != p.GetValue(odds, null)) { p.SetValue(this, p.GetValue(odds, null)); } } }
public bool MatchesOdds(RunnerOdd odds) { return(Name == odds.RName && No == odds.RNo); }