Is there a better way to convert to a specific type with reflection?
You could use an extension method (if this is common), or a regular generic method with a &quot;IConvertible&quot; constraint on the desired value then call &quot;Convert.ChangeType&quot; in your SetValue call.
static class ObjectExtensions
{
    public static void SetPropertyValue&lt;T&gt;(this object obj, string propertyName, T propertyValue)
        where T : IConvertible
    {
        PropertyInfo pi = obj.GetType().GetProperty( propertyName );
        
        if( pi != null &amp;&amp; pi.CanWrite )
        {
            pi.SetValue
            (
                obj,
                Convert.ChangeType(propertyValue, pi.PropertyType),
                null
            );
        }
    }
}

class TestObject
{
    public string Property1 { get; set; }
    public int Property2 { get; set; }
}

void Main()
{
    TestObject o = new TestObject();
    
    // Propery1 == null, Property2 == 0
    o.SetPropertyValue( &quot;Property1&quot;, 1 );
    o.SetPropertyValue( &quot;Property2&quot;, &quot;123&quot; );
    // Propery1 == 1, Property2 == 123
}

Obviously no error handling and this is assuming you want it available on all types, so I just threw it in an &quot;ObjectExtensions&quot; class so it'll be visible on all types.
Just adjust the constraints to fit your exact needs, or just throw it in a regular class if you don't want to use extensions.