title: Unable to cast object of type 'System.Reflection.RuntimePropertyInfo' to type 'System.IConvertible'
body: <p>I am having issues with the following code. I am iterating through a set to see if an object has a certain property type and if so, do some conversion to it. </p>
  
  <pre><code>var props = obj.GetType().GetProperties();
  foreach (var p in props)
  {     
      if (p.PropertyType == typeof(System.Boolean))
      {
      var conv = Convert.ToByte(p);
      }
  }
  </code></pre>
  
  <p>I get the following error when I try to run it:</p>
  
  <p>"Unable to cast object of type 'System.Reflection.RuntimePropertyInfo' to type 'System.IConvertible'."</p>