using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace JLHHJSvr.Com.Model { public sealed class CalCulationFormula { /// /// 公式id /// public int formula_id { get; set; } /// /// 公式名 /// public string formula_name { get; set; } /// /// 公式 /// public string formula { get; set; } /// /// 转换后公式 /// public string formula_transform { get; set; } /// /// 计算后值 /// public object value { get; set; } public override bool Equals(object o) { if (this == o) { return true; } //内存地址不相等,就得比属性 if (o is CalCulationFormula) { CalCulationFormula item = (CalCulationFormula)o; return formula_id == item.formula_id && formula_name.Equals(item.formula_name); } return false; } public override int GetHashCode() { int hash = 17; hash = hash * 23 + formula_id.GetHashCode(); hash = hash * 23 + formula_name.GetHashCode(); return hash; } } }