LocalizableAttribute Constructor

LocalizableAttribute.LocalizableAttribute Constructor

Initializes a new instance of the LocalizableAttribute class.

Namespace: System.ComponentModel
Assembly: System (in system.dll)

public LocalizableAttribute (
	bool isLocalizable
)
public LocalizableAttribute (
	boolean isLocalizable
)
public function LocalizableAttribute (
	isLocalizable : boolean
)
Not applicable.

Parameters

isLocalizable

true if a property should be localized; otherwise, false.

The following example marks a property as needing to be localized. This code creates a new LocalizableAttribute, sets its value to LocalizableAttribute.Yes, and binds it to the property.


[Localizable(true)]
public int MyProperty {
   get {
      // Insert code here.
      return 0;
   }
   set {
      // Insert code here.
   }
}
   

/** @attribute Localizable(true)
 */

/** @property 
 */
public int get_MyProperty()
{
    // Insert code here.
    return 0;
} //get_MyProperty

/** @property
 */
public void set_MyProperty(int value)
{
    // Insert code here.
} //set_MyProperty

public Localizable(true)
function get MyProperty() : int{
  // Insert code here.  Attribute goes on getter only when a property has
  // both a getter and a setter.
  return 0
}

function set MyProperty(value : int){
  // Insert code here.
}


Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0

Community Additions

ADD
Show:
© 2016 Microsoft