ProfileSection.Inherits Proprietà
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Ottiene o imposta un riferimento al tipo per un tipo personalizzato derivato da 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
Valore della proprietà
Riferimento di tipo valido o stringa vuota (""). Il valore predefinito è una stringa vuota.
- Attributi
Esempio
Nell'esempio di codice seguente viene illustrato come utilizzare la Inherits proprietà . Questo esempio di codice fa parte di un esempio più ampio fornito per la ProfileSection classe .
// 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"
Commenti
In fase di esecuzione, il sistema di compilazione ASP.NET usa le informazioni specificate nella profile sezione della configurazione per generare una classe denominata ProfileCommon, derivata da ProfileBase. Per personalizzare le informazioni fornite da questa classe, è possibile impostare la Inherits proprietà sul nome di un tipo creato che deriva da ProfileBasee il sistema di compilazione userà questo tipo personalizzato come classe base per ProfileCommon.
Annotazioni
Se si specifica un riferimento al tipo nella Inherits proprietà , è possibile definire le proprietà nei tipi personalizzati non definiti con un property elemento .
Per altre informazioni sulle funzionalità del profilo aggiunte a ASP.NET 2.0, vedere Panoramica delle proprietà del profilo ASP.NET.