PasswordPropertyTextAttribute クラスとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > PasswordPropertyTextAttribute クラスの意味・解説 

PasswordPropertyTextAttribute クラス

メモ : このクラスは、.NET Framework version 2.0新しく追加されたものです。

オブジェクトテキスト表現アスタリスク (*) などの文字によって隠されることを示します。このクラス継承できません。

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

<AttributeUsageAttribute(AttributeTargets.All)> _
Public NotInheritable Class
 PasswordPropertyTextAttribute
    Inherits Attribute
Dim instance As PasswordPropertyTextAttribute
[AttributeUsageAttribute(AttributeTargets.All)] 
public sealed class PasswordPropertyTextAttribute
 : Attribute
[AttributeUsageAttribute(AttributeTargets::All)] 
public ref class PasswordPropertyTextAttribute
 sealed : public Attribute
/** @attribute AttributeUsageAttribute(AttributeTargets.All) */ 
public final class PasswordPropertyTextAttribute
 extends Attribute
AttributeUsageAttribute(AttributeTargets.All) 
public final class PasswordPropertyTextAttribute
 extends Attribute
解説解説

PasswordPropertyTextAttribute 属性プロパティまたは型に配置されている場合、そのテキスト表現プロパティ ウィンドウにおいてパスワード フィールドを示すためにドットまたはアスタリスク (*) として表示されます。

注意に関するメモ注意

このような表示にすることで、どんな種類暗号化情報セキュリティ情報でも隠すことができます属性使用方法については、「属性使用したメタデータ拡張」を参照してください

使用例使用例

PasswordPropertyTextAttribute使用して、PropertyGrid コントロール文字列プロパティの値を隠すコード例次に示しますコード全体については、「方法 : Windows フォーム コントロール属性適用する」を参照してください

' This property exists only to demonstrate the 
' PasswordPropertyText attribute. When this control 
' is attached to a PropertyGrid control, the returned 
' string will be displayed with obscuring characters
' such as asterisks. This property has no other effect.
<Category("Security"), _
Description("Demonstrates PasswordPropertyTextAttribute."),
 _
PasswordPropertyText(True)> _
Public ReadOnly Property
 Password() As String
    Get
        Return "This is a demo password."
    End Get
End Property
// This property exists only to demonstrate the 
// PasswordPropertyText attribute. When this control 
// is attached to a PropertyGrid control, the returned 
// string will be displayed with obscuring characters
// such as asterisks. This property has no other effect.
[Category("Security")]
[Description("Demonstrates PasswordPropertyTextAttribute.")]
[PasswordPropertyText(true)]
public string Password
{
    get
    {
        return "This is a demo password.";
    }
}
継承階層継承階層
System.Object
   System.Attribute
    System.ComponentModel.PasswordPropertyTextAttribute
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「PasswordPropertyTextAttribute クラス」の関連用語

PasswordPropertyTextAttribute クラスのお隣キーワード
検索ランキング

   

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



PasswordPropertyTextAttribute クラスのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

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

©2025 GRAS Group, Inc.RSS