예제 #1
0
        public List <NymexInfo> readNymexFile(string fileName)
        {
            var nymexList = new List <NymexInfo>();

            using (var sr = new StreamReader(fileName))
            {
                while (sr.Peek() != -1)
                {
                    var line  = sr.ReadLine();
                    var field = line.Split(',');

                    var obj = new NymexInfo(field[0], field[1], field[2], field[3], field[4], field[5], field[6], field[7], field[8]);

                    nymexList.Add(obj);
                }

                sr.Close();
            }

            return(nymexList);
        }
        public List<NymexInfo> readNymexFile(string fileName)
        {
            var nymexList = new List<NymexInfo>();

            using (var sr = new StreamReader(fileName))
            {
                while (sr.Peek() != -1)
                {
                    var line = sr.ReadLine();
                    var field = line.Split(',');

                    var obj = new NymexInfo(field[0], field[1], field[2], field[3], field[4], field[5], field[6], field[7], field[8]);

                    nymexList.Add(obj);
                }

                sr.Close();
            }

            return nymexList;
        }