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 というクラスを生成します。 このクラスが提供する情報をカスタマイズするには、ProfileBaseから派生した型の名前に Inherits プロパティを設定し、コンパイル システムはこのカスタム型をProfileCommonの基底クラスとして使用します。
注
Inherits プロパティに型参照を指定する場合は、property要素で定義されていないカスタム型のプロパティを定義できます。
ASP.NET 2.0 に追加されたプロファイル機能の詳細については、「 ASP.NET プロファイルプロパティの概要」を参照してください。