public static DynamicCsvStream Parse(string fileName)
 {
     using (StreamReader fileStream = new StreamReader(fileName))
     {
         return(DynamicCsvStream.Load(fileStream));
     }
 }
        public static DynamicCsvStream Load(StreamReader fileStream)
        {
            DynamicCsvStream dynamicCsvStream = new DynamicCsvStream();
            string           currentRow       = string.Empty;
            bool             isHeaderRow      = default(bool);

            while (!string.IsNullOrEmpty(currentRow = fileStream.ReadLine()))
            {
                if (currentRow.StartsWith(DynamicCsvStream.Comment))
                {
                    continue;
                }
                else if (!isHeaderRow)
                {
                    dynamicCsvStream.HeaderColumns.AddRange(currentRow.Split(DynamicCsvStream.CommaDelimiter));
                    isHeaderRow = true;
                }
                else
                {
                    dynamicCsvStream._RowCollection.Add(new DynamicCsvRow(currentRow, dynamicCsvStream._HeaderColumns));
                }
            }
            return(dynamicCsvStream);
        }
 public DynamicCsvStream(DynamicCsvStream dynamicCsvStream)
 {
     this._HeaderColumns = dynamicCsvStream._HeaderColumns;
     this._RowCollection = dynamicCsvStream._RowCollection;
 }