GetHeader() public method

Get the specified header.
public GetHeader ( int index ) : String
index int The index of the header to get.
return String
Ejemplo n.º 1
0
 private void x7e640a0bc3eeb27e(ReadCSV xe4aa442e12986e06)
 {
     int num;
     CSVHeaders headers = new CSVHeaders(xe4aa442e12986e06.ColumnNames);
     if (3 != 0)
     {
         this._xa942970cc8a85fd4 = new AnalyzedField[xe4aa442e12986e06.ColumnCount];
         num = 0;
         goto Label_0031;
     }
     Label_0013:
     this._xa942970cc8a85fd4[num] = new AnalyzedField(this._x594135906c55045c, headers.GetHeader(num));
     num++;
     Label_0031:
     if (num >= this._xa942970cc8a85fd4.Length)
     {
         return;
     }
     if (num >= xe4aa442e12986e06.ColumnCount)
     {
         throw new AnalystError("CSV header count does not match column count");
     }
     if (((uint) num) >= 0)
     {
     }
     goto Label_0013;
 }
Ejemplo n.º 2
0
 /// <summary>
 ///     Generate the fields using header values.
 /// </summary>
 /// <param name="csv">The CSV file to use.</param>
 private void GenerateFieldsFromHeaders(ReadCSV csv)
 {
     var h = new CSVHeaders(csv.ColumnNames);
     _fields = new AnalyzedField[csv.ColumnCount];
     for (int i = 0; i < _fields.Length; i++)
     {
         if (i >= csv.ColumnCount)
         {
             throw new AnalystError(
                 "CSV header count does not match column count");
         }
         _fields[i] = new AnalyzedField(_script, h.GetHeader(i));
     }
 }