title: Why does GetFields() not return anything?
body: <p>I am trying to retrieve the public properties of an object but it is returning nothing.  Can you tell me what I'm doing wrong.  </p>
  
  <pre><code>public class AdHocCallReportViewModel : ReportViewModel
  {
      public string OperatorForCustEquipID { get; set; }
      public string OperatorForPriorityID { get; set; }
      public string OperatorForCallTypeID { get; set; }
      public string OperatorForStatusID { get; set; }
  }
  
  public UpdateReportParameters(AdHocCallReportViewModel rvm)
  {
      var type = rvm.GetType();
      foreach (var f in type.GetFields().Where(f =&gt; f.IsPublic))
      {
          Console.WriteLine(f.Name);
          Console.WriteLine(f.GetValue(rvm).ToString());
      }
  }  
  </code></pre>
  
  <p>When stepping through the code, it skips over the foreach loop because GetFields returns zero items.</p>