다음을 통해 공유


ProfilePropertySettings.ReadOnly 속성

정의

동적으로 생성된 ProfileCommon 클래스의 연결된 속성이 읽기 전용인지 여부를 결정하는 값을 가져오거나 설정합니다.

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

속성 값

클래스의 연결된 속성이 읽기 전용이면 A이고, 그렇지 않으면 . 기본값은 false입니다.

특성

예제

다음 코드 예제에서는 속성을 사용 하는 방법을 보여 있습니다 ReadOnly . 이 코드 예제는 클래스에 제공된 더 큰 예제의 ProfileSection 일부입니다.

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

설명

런타임에 ASP.NET 컴파일 시스템은 구성 파일의 섹션에 profile 지정된 정보를 사용하여 파생되는 ProfileBase클래스를 ProfileCommon생성합니다. 클래스를 사용하면 개별 사용자 프로필에 대한 값에 액세스하고 수정할 수 있습니다.

ProfileCommon 클래스 정의는 구성 파일 섹션의 하위 섹션에 propertiesprofile 정의된 속성을 기반으로 합니다. 클래스 인스턴스 ProfilePropertySettings 에 대해 지정하는 속성 값은 클래스에서 ProfileCommon 연결된 속성을 정의하는 데 사용됩니다.

적용 대상

추가 정보