public static int GetInvestment(string szClasstag, INVESTMENT type) { if (type == INVESTMENT.AE) { return(m_vInvestments[szClasstag].AE); } else if (type == INVESTMENT.TE) { return(m_vInvestments[szClasstag].TE); } return(0); // wat }
public static int GetTotalInvestments(INVESTMENT type) { int nTotal = 0; foreach (KeyValuePair <string, Investment> inv in m_vInvestments) { if (type == INVESTMENT.AE) { nTotal += inv.Value.AE; } else if (type == INVESTMENT.TE) { nTotal += inv.Value.TE; } } return(nTotal); }