“Property set method not found” error during reflection

From the documentation:

BindingFlags.SetProperty

Specifies that the value of the specified property should be set. For
COM properties, specifying this binding flag is equivalent to
specifying PutDispProperty and PutRefDispProperty.

BindingFlags.SetProperty and BindingFlags.GetProperty do not filter properties that are missing setters or getters, respectively.

To check if a property can be set, use the CanWrite property.

if (pi.CanWrite)
    pi.SetValue(this, valueFromData, null);

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)