言語

ProfilePropertySettings.Name プロパティ

定義

動的に生成されたProfilePropertySettings クラスのProfileCommon オブジェクトと関連付けられたプロパティの名前を取得または設定します。

public:
 property System::String ^ Name { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("name", IsKey=true, IsRequired=true)]
public string Name { get; set; }
[<System.Configuration.ConfigurationProperty("name", IsKey=true, IsRequired=true)>]
member this.Name : string with get, set
Public Property Name As String

プロパティ値

ProfilePropertySettings オブジェクトの名前を含む文字列。 既定値は null です。

属性

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

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

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

' Set the Name property to "LastAccessDate".
profilePropertySettings.Name = "LastAccessDate"

注釈

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

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

適用対象

こちらもご覧ください