public void collectData(string[] args, Data x) { StreamReader fileReader = new StreamReader(args[0]); using (fileReader) { string fileLine = fileReader.ReadLine(); while (fileLine != null) { dynArr.Add(fileLine); fileLine = fileReader.ReadLine(); } x.controlData(dynArr); } }
static void Main(string[] args) { Data x = new Data(); x.collectData(args, x); }