title: Fill struct with String[]?
body: <p>I'm parsing a CSV file and placing the data in a struct. I'm using the <code>TextFieldParser</code> from <a href="https://stackoverflow.com/questions/1405038/reading-csv-files-in-net">this question</a> and it's working like a charm except that it returns a <code>String[]</code>. Currently I have the ugly process of:</p>
  
  <pre><code>String[] row = parser.ReadFields();
  DispatchCall call = new DispatchCall();
  if (!int.TryParse(row[0], out call.AccountID)) {
      Console.WriteLine("Invalid Row: " + parser.LineNumber);
      continue;
  }
  call.WorkOrder = row[1];
  call.Description = row[2];
  call.Date = row[3];
  call.RequestedDate = row[4];
  call.EstStartDate = row[5];
  call.CustomerID = row[6];
  call.CustomerName = row[7];
  call.Caller = row[8];
  call.EquipmentID = row[9];
  call.Item = row[10];
  call.TerritoryDesc = row[11];
  call.Technician = row[12];
  call.BillCode = row[13];
  call.CallType = row[14];
  call.Priority = row[15];
  call.Status = row[16];
  call.Comment = row[17];
  call.Street = row[18];
  call.City = row[19];
  call.State = row[20];
  call.Zip = row[21];
  call.EquipRemarks = row[22];
  call.Contact = row[23];
  call.ContactPhone = row[24];
  call.Lat = row[25];
  call.Lon = row[26];
  call.FlagColor = row[27];
  call.TextColor = row[28];
  call.MarkerName = row[29];
  </code></pre>
  
  <p>The struct consists of all those fields being <code>String</code>s except for AccountID being an <code>int</code>. It annoys me that they're not strongly typed, but let's over look that for now. Given that <code>parser.ReadFields()</code> returns a <code>String[]</code> is there a more efficient way to fill a struct (possibly converting some values such as <code>row[0]</code> needing to become an <code>int</code>) with the values in the array?</p>
  
  <p>**EDIT:**One restriction I forgot to mention that <em>may</em> impact what kind of solutions will work is that this struct is <code>[Serializable]</code> and will be sent Tcp somewhere else.</p>