private void SetupInstruments(Project prj) { string[] symbols = stockSymbols.Split(new char[] { '\n', '\r' }); prj.ClearInstruments(); foreach (string symbol in symbols) { AttachInstrument(prj, symbol); } }
private void SetupInstruments(Project prj) { string[] symbols = stockSymbols .Split(new char[] {'\n', '\r'}, StringSplitOptions.RemoveEmptyEntries) .Distinct() .ToArray(); prj.ClearInstruments(); foreach (string symbol in symbols) { AttachInstrument(prj, symbol); } }