LocalizableAttribute.IsLocalizable プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > LocalizableAttribute.IsLocalizable プロパティの意味・解説 

LocalizableAttribute.IsLocalizable プロパティ

プロパティをローカライズする必要があるかどうかを示す値を取得します。

名前空間: System.ComponentModel
アセンブリ: System (system.dll 内)
構文構文

Dim instance As LocalizableAttribute
Dim value As Boolean

value = instance.IsLocalizable
public bool IsLocalizable { get;
 }
public:
property bool IsLocalizable {
    bool get ();
}
/** @property */
public boolean get_IsLocalizable ()

プロパティ値
プロパティをローカライズする必要がある場合は true。それ以外の場合は false。

使用例使用例

MyProperty の LocalizableAttribute の値を確認する方法の例を次に示します。最初に、オブジェクトのすべてのプロパティを保持する PropertyDescriptorCollection を取得します。次に、PropertyDescriptorCollection から MyProperty を取得します。そして、このプロパティの属性を返し、その属性を属性変数に保存します。

最後に、myAttribute を AttributeCollection にある LocalizableAttribute の値に設定し、プロパティをローカライズする必要があるかどうかを確認します。

' Gets the attributes for the property.
Dim attributes As AttributeCollection = _
   TypeDescriptor.GetProperties(Me)("MyProperty").Attributes
       
' Checks to see if the property needs to be localized.
Dim myAttribute As LocalizableAttribute = _
   CType(attributes(GetType(LocalizableAttribute)), LocalizableAttribute)
   
If myAttribute.IsLocalizable Then
     ' Insert code here.
End If

// Gets the attributes for the property.
 AttributeCollection attributes = 
    TypeDescriptor.GetProperties(this)["MyProperty"].Attributes;
 
 // Checks to see if the property needs to be localized.
 LocalizableAttribute myAttribute = 
    (LocalizableAttribute)attributes[typeof(LocalizableAttribute)];
 if(myAttribute.IsLocalizable) {
    // Insert code here.
 }
 
// Gets the attributes for the property.
AttributeCollection^ attributes = TypeDescriptor::GetProperties( this
 )[ "MyProperty" ]->Attributes;

// Checks to see if the property needs to be localized.
LocalizableAttribute^ myAttribute = dynamic_cast<LocalizableAttribute^>(attributes[
 LocalizableAttribute::typeid ]);
if ( myAttribute->IsLocalizable )
{
   // Insert code here.
}
// Gets the attributes for the property.
AttributeCollection attributes = TypeDescriptor.
GetProperties(this).get_Item("MyProperty").get_Attributes();

// Checks to see if the property needs to be localized.
LocalizableAttribute myAttribute = ((LocalizableAttribute)
    (attributes.get_Item(LocalizableAttribute.class.ToType())));
if (myAttribute.get_IsLocalizable()) {
    // Insert code here.
}
// Gets the attributes for the property.
var attributes : AttributeCollection = TypeDescriptor.GetProperties(this)["MyProperty"].Attributes
       
// Checks to see if the property needs to be localized.
var myAttribute : LocalizableAttribute = LocalizableAttribute(attributes(LocalizableAttribute))
   
if(myAttribute.IsLocalizable){
     // Insert code here.
}

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
LocalizableAttribute クラス
LocalizableAttribute メンバ
System.ComponentModel 名前空間
LocalizableAttribute クラス
Attribute
PropertyDescriptor
AttributeCollection クラス
PropertyDescriptorCollection



英和和英テキスト翻訳

英語⇒日本語日本語⇒英語

辞書ショートカット

すべての辞書の索引

「LocalizableAttribute.IsLocalizable プロパティ」の関連用語

LocalizableAttribute.IsLocalizable プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



LocalizableAttribute.IsLocalizable プロパティのページの著作権

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2026 Microsoft.All rights reserved.

©2026 GRAS Group, Inc.RSS