Setting descriptor attributes

Setting descriptor attributes specify how properties are stored in the underlying collection. Applying a SettingDescriptorAttribute to a property of a SettingCollectionBase defines a descriptor that is used to read and write the value of the property.

Applying [SettingDescriptor] to a property will store the value as a string with the same key as the property name if no other parameters are specified for the attribute.

The following property will be stored as MyProperty=MyValue

[SettingDescriptor]
public string MyProperty
{
    get
    {
        return "MyValue";
    }
}

Boolean descriptor attribute

Setting boolean descriptor attributes specifies that the boolean value should be stored as a single bit within a bitmask value.

Last edited Nov 17, 2011 at 12:34 PM by radicalresearch, version 5

Comments

No comments yet.