G
Guest
I'm using PropertyDescriptor.SetValue to set the values of a number of
properties on a class. This works perfectly, when the properties doesn't have
the ReadOnly attribute set.
According to the documentation, this attribute should only prevent the
property from beeing set at design-time, but I can't get it to work at
run-time.
This is one of my properties:
[ReadOnly(true)]
public string Name
{
get
{
return name;
}
set
{
name = value;
}
}
Any ideas why I can't set the property at run-time ?
Thanks in advance,
Thomas
properties on a class. This works perfectly, when the properties doesn't have
the ReadOnly attribute set.
According to the documentation, this attribute should only prevent the
property from beeing set at design-time, but I can't get it to work at
run-time.
This is one of my properties:
[ReadOnly(true)]
public string Name
{
get
{
return name;
}
set
{
name = value;
}
}
Any ideas why I can't set the property at run-time ?
Thanks in advance,
Thomas