public void SetAllDescriptions(CSymbolList thatSymbolList) { for (int i = 0; i < Count; ++i) { CQuantity thisQuantity = this[i]; thisQuantity.SetDescription(thatSymbolList); } }
// Construct a deep copy public CSymbolList(CSymbolList thatSymbolList) : base() { for (int i = 0; i < thatSymbolList.Count; ++i) { CSymbol newSymbol = new CSymbol(thatSymbolList[i]); Add(newSymbol); } }
// Look up my symbol in the symbol list. If found then copy the description and unit. public void SetDescription(CSymbolList thatSymbolList) { int s; s = thatSymbolList.FindMatch(_symbol.Label); if (s > -1) { CSymbol thatSymbol = thatSymbolList[s]; _symbol.Description = thatSymbol.Description; _symbol.Unit = thatSymbol.Unit; } }