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

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

ControlCollection.IsReadOnly プロパティ

ControlCollection オブジェクト読み取り専用かどうかを示す値を取得します

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

Dim instance As ControlCollection
Dim value As Boolean

value = instance.IsReadOnly
public bool IsReadOnly { get;
 }
public:
property bool IsReadOnly {
    bool get ();
}
/** @property */
public boolean get_IsReadOnly ()

プロパティ
コントロール読み取り専用場合trueそれ以外場合false既定値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.IsReadOnly プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からControlCollection.IsReadOnly プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からControlCollection.IsReadOnly プロパティ を検索

英和和英テキスト翻訳

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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2026 GRAS Group, Inc.RSS