Aracılığıyla paylaş


ProfileSection.Inherits Özellik

Tanım

türünden ProfileBasetüretilmiş bir özel tür için tür başvurusu alır veya ayarlar.

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

Özellik Değeri

Geçerli bir tür başvurusu veya boş bir dize (""). Varsayılan değer boş bir dizedir.

Öznitelikler

Örnekler

Aşağıdaki kod örneği özelliğinin Inherits nasıl kullanılacağını gösterir. Bu kod örneği, sınıfı için ProfileSection sağlanan daha büyük bir örneğin parçasıdır.


// 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"

Açıklamalar

Çalışma zamanında, ASP.NET derleme sistemi yapılandırmanın profile bölümünde belirtilen bilgileri kullanarak öğesinden ProfileBasetüretilen adlı ProfileCommonbir sınıf oluşturur. Bu sınıfın sağladığı bilgileri özelleştirmek için özelliğini, öğesinden ProfileBasetüretilen oluşturduğunuz bir türün adına ayarlayabilirsiniz Inherits ve derleme sistemi bu özel türü için ProfileCommontemel sınıf olarak kullanır.

Not

özelliğinde Inherits bir tür başvurusu sağlarsanız, özel türlerinizde bir property öğeyle tanımlanmayan özellikleri tanımlayabilirsiniz.

ASP.NET 2.0'a eklenen profil özellikleri hakkında daha fazla bilgi için bkz. ASP.NET Profil Özelliklerine Genel Bakış.

Şunlara uygulanır

Ayrıca bkz.