// operator + overload public static ExcoMoney operator +(ExcoMoney m1, ExcoMoney m2) { ExcoMoney result = new ExcoMoney(); result.amountCA = m1.amountCA + m2.amountCA; result.amountCP = m1.amountCP + m2.amountCP; result.amountUS = m1.amountUS + m2.amountUS; return(result); }
// operator - overload public static ExcoMoney operator -(ExcoMoney m1, ExcoMoney m2) { ExcoMoney result = new ExcoMoney(); result.amountCA = m1.amountCA - m2.amountCA; result.amountCP = m1.amountCP - m2.amountCP; result.amountUS = m1.amountUS - m2.amountUS; result.currency = m1.currency; return(result); }
// constructor public ExcoAccount(int glNo1, int glNo2, string sTitle, int fiscalYear) { this.glNo1 = glNo1; this.glNo2 = glNo2; this.sTitle = sTitle; this.fiscalYear = fiscalYear; for (int i = 0; i < 12; i++) { // markham, michigan and texas actual[i] = new ExcoMoney(); actualRatio[i] = 0.0; budget[i] = new ExcoMoney(); budgetRatio[i] = 0.0; actualLastYear[i] = new ExcoMoney(); actualRatioLastYear[i] = 0.0; // colombia actual04[i] = new ExcoMoney(); actualRatio04[i] = 0.0; budget04[i] = new ExcoMoney(); budgetRatio04[i] = 0.0; actualLastYear04[i] = new ExcoMoney(); actualRatioLastYear04[i] = 0.0; actual41[i] = new ExcoMoney(); actualRatio41[i] = 0.0; budget41[i] = new ExcoMoney(); budgetRatio41[i] = 0.0; actualLastYear41[i] = new ExcoMoney(); actualRatioLastYear41[i] = 0.0; actual48[i] = new ExcoMoney(); actualRatio48[i] = 0.0; budget48[i] = new ExcoMoney(); budgetRatio48[i] = 0.0; actualLastYear48[i] = new ExcoMoney(); actualRatioLastYear48[i] = 0.0; actual49[i] = new ExcoMoney(); actualRatio49[i] = 0.0; budget49[i] = new ExcoMoney(); budgetRatio49[i] = 0.0; actualLastYear49[i] = new ExcoMoney(); actualRatioLastYear49[i] = 0.0; } }