title: DataTable from FileHelpers Class -- type.GetProperties() returns empty array
body: <p>I've successfully pulled a CSV file into the following class:</p>
  
  <pre><code>[DelimitedRecord(",")]
  [IgnoreFirst(1)] // ignores first line of file, since it's a header
  public class Employee {
      public string EmployeeId;
      public string FirstName;
      public string LastName;
      // etc.
  }
  </code></pre>
  
  <p>I need to create a DataTable based on that class in order to use SqlBulkCopy. I've found several examples, but the following method doesn't work for me:</p>
  
  <pre><code>private static DataTable createEmptyDataTable(Type myType) {
          DataTable dt = new DataTable();
  
          foreach (PropertyInfo info in myType.GetProperties()) {
              dt.Columns.Add(new DataColumn(info.Name, info.PropertyType));
          }
  
          return dt;
      }
  </code></pre>
  
  <p>The problem is with myType.GetProperties().  It's not throwing an error, but it returns nothing. The PropertyInfo array that it should return is empty.  Been at this a while and can't figure out the problem...</p>
  
  <p>EDIT:
  I've also used this variant with no success:</p>
  
  <pre><code>private static DataTable createEmptyDataTable(Type myType) {
          DataTable dt = new DataTable();
          PropertyInfo[] infoArray = myType.GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static);
  
          foreach (PropertyInfo info in infoArray) {
              dt.Columns.Add(new DataColumn(info.Name, info.PropertyType));
          }
  
          return dt;
      }
  </code></pre>