public float GetData(LS stat, int year = -1) { if (year == -1) { year = Values.date.Year; } if (seasonStats.d.ContainsKey(year)) { if (seasonStats[year].d.ContainsKey(stat)) { return(seasonStats[year][stat]); } else { throw new NullReferenceException("There is no such value named as " + stat.ToString() + "."); } } else { throw new NullReferenceException("There is no such value in year " + year.ToString() + "."); } }