ProfilePropertySettings.ReadOnly Eigenschap

Definitie

Hiermee wordt een waarde opgehaald of ingesteld die bepaalt of de bijbehorende eigenschap in de dynamisch gegenereerde ProfileCommon klasse alleen-lezen is.

public:
 property bool ReadOnly { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("readOnly", DefaultValue=false)]
public bool ReadOnly { get; set; }
[<System.Configuration.ConfigurationProperty("readOnly", DefaultValue=false)>]
member this.ReadOnly : bool with get, set
Public Property ReadOnly As Boolean

Waarde van eigenschap

trueals de bijbehorende eigenschap in de ProfileCommon klasse alleen-lezen is; anders. false De standaardwaarde is false.

Kenmerken

Voorbeelden

In het volgende codevoorbeeld ziet u hoe u de ReadOnly eigenschap gebruikt. Dit codevoorbeeld maakt deel uit van een groter voorbeeld voor de ProfileSection klasse.

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

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

' Set the ReadOnly property to true.
profilePropertySettings.ReadOnly = true

Opmerkingen

Tijdens runtime gebruikt het ASP.NET compilatiesysteem de informatie die is opgegeven in de sectie profile van het configuratiebestand om een klasse te genereren met de naam ProfileCommon, die is afgeleid van ProfileBase. Met de klasse kunt u de waarden voor afzonderlijke gebruikersprofielen openen en wijzigen.

De ProfileCommon klassedefinitie is gebaseerd op de eigenschappen die zijn gedefinieerd in de properties subsectie van de profile sectie van het configuratiebestand. De eigenschapswaarden die u opgeeft voor een exemplaar van de ProfilePropertySettings klasse, worden gebruikt om een gekoppelde eigenschap in de ProfileCommon klasse te definiƫren.

Van toepassing op

Zie ook