System.ComponentModel.LocalizableAttribute Class

Specifies whether a property should be localized. This class cannot be inherited.

See Also: LocalizableAttribute Members

Syntax

[System.AttributeUsage(System.AttributeTargets.All)]
public sealed class LocalizableAttribute : Attribute

Remarks

When code is generated for a component, members that are marked with the System.ComponentModel.LocalizableAttribute set to true have their property values saved in resource files. You can localize these resource files without modifying the code.

By default, members that have no localizable attribute or are marked with the System.ComponentModel.LocalizableAttribute set to false will have their property values persisted to code, if the data type allows. Otherwise, if the main component is set to Localizable, all properties will be persisted to the resource file. The default is false.

Note:

When you mark a property with the System.ComponentModel.LocalizableAttribute set to true, the value of this attribute is set to the constant member LocalizableAttribute.Yes. For a property marked with the System.ComponentModel.LocalizableAttribute set to false, the value is LocalizableAttribute.No. Therefore, when you want to check the value of this attribute in your code, you must specify the attribute as LocalizableAttribute.Yes or LocalizableAttribute.No.

For more information, see Extending Metadata Using Attributes.

Requirements

Namespace: System.ComponentModel
Assembly: System (in System.dll)
Assembly Versions: 1.0.3300.0, 1.0.5000.0, 2.0.0.0, 4.0.0.0