/// <summary> /// 获取由指定年份表达式计算而得的值,或者设置年份表达式为返回指定值的常量表达式 /// </summary> /// <param name="year">年份,绝对或相对均可</param> /// <returns>值</returns> public double this[int year] { get { if (year > 1900) { return(ExprA(year)()); } else { return(Expr(year)()); } } set { if (year > 1900) { _values[year] = value; //SetExpr(year, () => value); } else { _values[CityStatistics.Current.C02 + year] = value; } } }
/// <summary> /// 获取由指定年份表达式计算而得的值 /// </summary> /// <param name="year">年份</param> /// <returns>值</returns> public double Year(int year) { return(ExprA(year)()); }