title: Setting a property by reflection with a string value
body: <p>I'd like to set a property of an object through Reflection, with a value of type <code>string</code>.
  So, for instance, suppose I have a <code>Ship</code> class, with a property of <code>Latitude</code>, which is a <code>double</code>.</p>
  
  <p>Here's what I'd like to do:</p>
  
  <pre><code>Ship ship = new Ship();
  string value = "5.5";
  PropertyInfo propertyInfo = ship.GetType().GetProperty("Latitude");
  propertyInfo.SetValue(ship, value, null);
  </code></pre>
  
  <p>As is, this throws an <code>ArgumentException</code>:</p>
  
  <blockquote>
    <p>Object of type 'System.String' cannot be converted to type 'System.Double'.</p>
  </blockquote>
  
  <p>How can I convert value to the proper type, based on <code>propertyInfo</code>?</p>