ProfileSection.Inherits プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
ProfileBase から派生したカスタム型の型参照を取得または設定します。
public:
property System::String ^ Inherits { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("inherits", DefaultValue="")]
public string Inherits { get; set; }
[<System.Configuration.ConfigurationProperty("inherits", DefaultValue="")>]
member this.Inherits : string with get, set
Public Property Inherits As String
プロパティ値
有効な型参照、または空の文字列 ("")。 既定値は空の文字列です。
- 属性
例
次のコード例は、Inherits プロパティの使用方法を示しています。 このコード例は、ProfileSection クラスのために提供されている大規模な例の一部です。
// Get the current Inherits property value.
Console.WriteLine(
"Current Inherits value: '{0}'", profileSection.Inherits);
// Set the Inherits property to
// "CustomProfiles.MyCustomProfile, CustomProfiles.dll".
profileSection.Inherits = "CustomProfiles.MyCustomProfile, CustomProfiles.dll";
' Get the current Inherits property value.
Console.WriteLine( _
"Current Inherits value: '{0}'", profileSection.Inherits)
' Set the Inherits property to
' "CustomProfiles.MyCustomProfile, CustomProfiles.dll".
profileSection.Inherits = "CustomProfiles.MyCustomProfile, CustomProfiles.dll"
注釈
実行時に、ASP.NET コンパイル システムは、構成の セクションで指定された情報をprofile
使用して、 からProfileBase派生した というProfileCommon
クラスを生成します。 このクラスが提供する情報をカスタマイズするには、 プロパティを Inherits から ProfileBase派生する型の名前に設定できます。コンパイル システムでは、 の基本クラス ProfileCommon
としてこのカスタム型が使用されます。
注意
プロパティに Inherits 型参照を指定する場合は、要素で定義されていないカスタム型のプロパティを property
定義できます。
ASP.NET 2.0 に追加されたプロファイル機能の詳細については、「 ASP.NET プロファイル プロパティの概要」を参照してください。