public void WriteToFile(Efficiency CurrentEfficiency) { List <Efficiency> tempEfficiencyList = new List <Efficiency>(); tempEfficiencyList = readFromFile(); tempEfficiencyList[System.DateTime.Now.Month - 1] = CurrentEfficiency; StreamWriter writer = new StreamWriter("Efficiency.txt", false); for (int i = 0; i < 12; i++) { writer.WriteLine(tempEfficiencyList.ElementAt(i).efficiency.ToString()); } writer.Close(); }
public void setDataForEfficencyCalc(Efficiency EffObj) { CurrentMonthEfficiency = EffObj; }