ProfilePropertySettings.ReadOnly プロパティ

定義

動的に生成された ProfileCommon クラスの関連付けられたプロパティが読み取り専用かどうかを決定する値を取得または設定します。

public:
 property bool ReadOnly { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("readOnly", DefaultValue=false)]
public bool ReadOnly { get; set; }
[<System.Configuration.ConfigurationProperty("readOnly", DefaultValue=false)>]
member this.ReadOnly : bool with get, set
Public Property ReadOnly As Boolean

プロパティ値

true ProfileCommon クラスの関連付けられたプロパティが読み取り専用の場合は。それ以外の場合はfalse。 既定値は、false です。

属性

次のコード例は、 ReadOnly プロパティの使用方法を示しています。 このコード例は、 ProfileSection クラスに提供されるより大きな例の一部です。

// Get the current ReadOnly property value.
Console.WriteLine(
    "Current ReadOnly value: '{0}'", profilePropertySettings.ReadOnly);

// Set the ReadOnly property to true.
profilePropertySettings.ReadOnly = true;
' Get the current ReadOnly property value.
Console.WriteLine( _
    "Current ReadOnly value: '{0}'", profilePropertySettings.ReadOnly)

' Set the ReadOnly property to true.
profilePropertySettings.ReadOnly = true

注釈

実行時に、ASP.NET コンパイル システムは、構成ファイルの profile セクションで指定された情報を使用して、ProfileBaseから派生した ProfileCommon というクラスを生成します。 このクラスを使用すると、個々のユーザー プロファイルの値にアクセスして変更できます。

ProfileCommon クラス定義は、構成ファイルの profile セクションの properties サブセクションで定義されているプロパティに基づいています。 ProfilePropertySettings クラスのインスタンスに指定するプロパティ値は、ProfileCommon クラスの関連付けられたプロパティを定義するために使用されます。

適用対象

こちらもご覧ください