다음을 통해 공유


ValidatorCollection.IsSynchronized 속성

정의

ValidatorCollection 컬렉션이 동기화되는지 여부를 나타내는 값을 가져옵니다.

public:
 property bool IsSynchronized { bool get(); };
public bool IsSynchronized { get; }
member this.IsSynchronized : bool
Public ReadOnly Property IsSynchronized As Boolean

속성 값

Boolean

컬렉션이 동기화되었으면 true이고, 그렇지 않으면 false입니다.

구현

예제

다음 코드 예제는 IsSynchronized 속성입니다.

// Get 'Validators' of the page to myCollection.
ValidatorCollection myCollection1 = Page.Validators;

// Get 'IsReadOnly' property of 'ValidatorCollection'.
bool readOnly_bool = myCollection1.IsReadOnly;

// Get 'IsSynchronized' property of 'ValidatorCollection'.
bool synchronized_bool = myCollection1.IsSynchronized;

// Get a synchronized object of the 'ValidatorCollection'.
ValidatorCollection myCollection2 = (ValidatorCollection)myCollection1.SyncRoot;
myCollection1.Add(myCollection1[0]);
' Get 'Validators' of the page to myCollection.
Dim myCollection1 As ValidatorCollection = Page.Validators
' Get 'IsReadOnly' property of 'ValidatorCollection'.
Dim readOnly_bool As Boolean = myCollection1.IsReadOnly

' Get 'IsSynchronized' property of 'ValidatorCollection'.
Dim synchronized_bool As Boolean = myCollection1.IsSynchronized

' Get a synchronized object of the 'ValidatorCollection'.
Dim myCollection2 As ValidatorCollection = CType(myCollection1.SyncRoot, ValidatorCollection)
myCollection1.Add(myCollection1(0))

설명

컬렉션이 동기화 되는 스레드로부터 안전 합니다.

적용 대상

추가 정보