ProfilePropertySettings.ReadOnly プロパティとは何? わかりやすく解説 Weblio辞書 (original) (raw)
メモ : このプロパティは、.NET Framework version 2.0 で新しく追加されたものです。
動的に生成された ProfileCommon クラスの関連付けられているプロパティが読み取り専用かどうかを決定する値を取得または設定します。
名前空間: System.Web.Configuration
アセンブリ: System.Web (system.web.dll 内)
構文
Public Property ReadOnly As Boolean
Dim instance As ProfilePropertySettings Dim value As Boolean
value = instance.ReadOnly
instance.ReadOnly = value
public bool ReadOnly { get; set; }
public: property bool ReadOnly { bool get (); void set (bool value); }
/** @property */ public boolean get_ReadOnly ()
/** @property */ public void set_ReadOnly (boolean value)
public function get ReadOnly () : boolean
public function set ReadOnly (value : boolean)
プロパティ値
ProfileCommon クラスの関連付けられているプロパティが読み取り専用の場合は **true**。それ以外の場合は **false**。既定値は false です。
実行時に、ASP.NET コンパイル システムは、構成ファイルの profile セクションに指定された情報を使用して、ProfileBase から派生した ProfileCommon というクラスを生成します。このクラスを使用すると、個々のユーザー プロファイルの値にアクセスしたり、値を変更したりできます。
ProfileCommon クラス定義は、構成ファイルの profile セクションの properties サブセクションで定義されたプロパティに基づきます。ProfilePropertySettings クラスのインスタンスに指定するプロパティ値は、ProfileCommon クラスの関連付けられているプロパティの定義に使用されます。
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;
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
関連項目
ProfilePropertySettings クラス
ProfilePropertySettings メンバ
System.Web.Configuration 名前空間
ProfileSection