ControlCollection.IsSynchronized プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > ControlCollection.IsSynchronized プロパティの意味・解説 

ControlCollection.IsSynchronized プロパティ

ControlCollection オブジェクト同期がとられているかどうかを示す値を取得します

名前空間: System.Web.UI
アセンブリ: System.Web (system.web.dll 内)
構文構文

Dim instance As ControlCollection
Dim value As Boolean

value = instance.IsSynchronized
public bool IsSynchronized { get;
 }
public:
virtual property bool IsSynchronized {
    bool get () sealed;
}
/** @property */
public final boolean get_IsSynchronized ()

プロパティ
このプロパティは常に 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
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ControlCollection クラス
ControlCollection メンバ
System.Web.UI 名前空間
Control.Controls プロパティ


このページでは「.NET Framework クラス ライブラリ リファレンス」からControlCollection.IsSynchronized プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からControlCollection.IsSynchronized プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からControlCollection.IsSynchronized プロパティ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

ControlCollection.IsSynchronized プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



ControlCollection.IsSynchronized プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS