ProfilePropertySettings.ReadOnly プロパティとは何? わかりやすく解説 Weblio辞書 (original) (raw)

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

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

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

Visual Basic (宣言)

Public Property ReadOnly As Boolean

Visual Basic (使用法)

Dim instance As ProfilePropertySettings Dim value As Boolean

value = instance.ReadOnly

instance.ReadOnly = value

C#

public bool ReadOnly { get; set; }

C++

public: property bool ReadOnly { bool get (); void set (bool value); }

J#

/** @property */ public boolean get_ReadOnly ()

/** @property */ public void set_ReadOnly (boolean value)

JScript

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 クラストピック取り上げているコード例一部分です。

Visual Basic

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

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

C#

// 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 によってサポートされていないバージョンありますサポートされているバージョンについては、「システム要件」を参照してください

バージョン情報バージョン情報

.NET Framework
サポート対象 : 2.0

参照参照

関連項目
ProfilePropertySettings クラス
ProfilePropertySettings メンバ
System.Web.Configuration 名前空間
ProfileSection