ControlCollection.IsSynchronized プロパティ
アセンブリ: System.Web (system.web.dll 内)

このプロパティは常に false です。

Button コントロール (myButton) の ControlCollection コレクション内を列挙するメソッドを作成するコード例を次に示します。列挙子が作成されると、操作がスレッド セーフかどうかを確認するために IsSynchronized プロパティがチェックされます。スレッド セーフでない場合は、SyncRoot プロパティを使用して、操作をスレッド セーフにするためのオブジェクトが取得されます。列挙処理が完了すると、IsReadOnly プロパティの値が、ページの Label コントロールの Text プロパティ値として書き込まれます。
' Create a method that enuberates through a ' button's ControlCollection in a thread-safe manner. Public Sub ListControlCollection(sender As Object, e As EventArgs) Dim myEnumerator As IEnumerator = myButton.Controls.GetEnumerator() ' Check the IsSynchronized property. If False, ' use the SyncRoot method to get an object that ' allows the enumeration of all controls to be ' thread safe. If myButton.Controls.IsSynchronized = False Then SyncLock myButton.Controls.SyncRoot While (myEnumerator.MoveNext()) Dim myObject As Object = myEnumerator.Current Dim childControl As LiteralControl = CType(myEnumerator.Current, LiteralControl) Response.Write("<b><br> This is the text of the child Control </b>: " & _ childControl.Text) End While msgReadOnly.Text = myButton.Controls.IsReadOnly.ToString() End SyncLock End If End Sub

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からControlCollection.IsSynchronized プロパティを検索する場合は、下記のリンクをクリックしてください。

- ControlCollection.IsSynchronized プロパティのページへのリンク