ValidatorCollectionとは? わかりやすく解説

ValidatorCollection クラス

IValidator 参照の配列を公開します。このクラスは継承できません。

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

Public NotInheritable Class
 ValidatorCollection
    Implements ICollection, IEnumerable
Dim instance As ValidatorCollection
public sealed class ValidatorCollection : ICollection,
 IEnumerable
public ref class ValidatorCollection sealed
 : ICollection, IEnumerable
public final class ValidatorCollection implements
 ICollection, IEnumerable
public final class ValidatorCollection implements
 ICollection, IEnumerable
解説解説
使用例使用例

Page.Validators プロパティを使用してコレクションにアクセスし、GetEnumerator メソッドを使用してその値を反復処理する方法を次のコード例に示します。

' Get 'Validators' of the page to myCollection.
Dim myCollection As ValidatorCollection = Page.Validators
' Get the Enumerator.
Dim myEnumerator As IEnumerator = myCollection.GetEnumerator()
' Print the values in the ValidatorCollection.
Dim myStr As String = "
 "
While myEnumerator.MoveNext()
   myStr += myEnumerator.Current.ToString()
   myStr += " "
End While
messageLabel.Text = myStr
// Get 'Validators' of the page to myCollection.
ValidatorCollection myCollection = Page.Validators;

// Get the Enumerator.
IEnumerator myEnumerator = myCollection.GetEnumerator();
// Print the values in the ValidatorCollection.
string myStr = " ";
while ( myEnumerator.MoveNext() )
{
   myStr += myEnumerator.Current.ToString();
   myStr += " ";
}
messageLabel.Text = myStr;
// Get 'Validators' of the page to myCollection.
ValidatorCollection myCollection = get_Validators();

// Get the Enumerator.
IEnumerator myEnumerator = myCollection.GetEnumerator();
// Print the values in the ValidatorCollection.
String myStr = " ";
while (myEnumerator.MoveNext()) {
    myStr += System.Convert.ToString(myEnumerator.get_Current());
    myStr += " ";
}
messageLabel.set_Text(myStr);
継承階層継承階層
System.Object
  System.Web.UI.ValidatorCollection
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバの場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
ValidatorCollection メンバ
System.Web.UI 名前空間
IValidator インターフェイス
Page.Validators プロパティ

ValidatorCollection コンストラクタ


ValidatorCollection プロパティ


パブリック プロパティパブリック プロパティ

  名前 説明
パブリック プロパティ Count コレクション内の参照の数を取得します。
パブリック プロパティ IsReadOnly ValidatorCollection コレクションが読み取り専用かどうかを示す値を取得します。
パブリック プロパティ IsSynchronized ValidatorCollection コレクションの同期がとられているかどうかを示す値を取得します。
パブリック プロパティ Item ValidatorCollection コレクションの指定したインデックス位置にある検証サーバー コントロールを取得します。
パブリック プロパティ SyncRoot ValidatorCollection コレクションの同期をとるために使用できるオブジェクトを取得します。
参照参照

関連項目

ValidatorCollection クラス
System.Web.UI 名前空間
IValidator インターフェイス
Page.Validators プロパティ

ValidatorCollection メソッド


パブリック メソッドパブリック メソッド

プロテクト メソッドプロテクト メソッド
参照参照

関連項目

ValidatorCollection クラス
System.Web.UI 名前空間
IValidator インターフェイス
Page.Validators プロパティ

ValidatorCollection メンバ

IValidator 参照の配列を公開します。このクラスは継承できません。

ValidatorCollection データ型で公開されるメンバを以下の表に示します。


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド ValidatorCollection ValidatorCollection クラスの新しいインスタンスを初期化します。
パブリック プロパティパブリック プロパティ
  名前 説明
パブリック プロパティ Count コレクション内の参照の数を取得します。
パブリック プロパティ IsReadOnly ValidatorCollection コレクションが読み取り専用かどうかを示す値を取得します。
パブリック プロパティ IsSynchronized ValidatorCollection コレクションの同期がとられているかどうかを示す値を取得します。
パブリック プロパティ Item ValidatorCollection コレクションの指定したインデックス位置にある検証サーバー コントロールを取得します。
パブリック プロパティ SyncRoot ValidatorCollection コレクションの同期をとるために使用できるオブジェクトを取得します。
パブリック メソッドパブリック メソッド
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

ValidatorCollection クラス
System.Web.UI 名前空間
IValidator インターフェイス
Page.Validators プロパティ



英和和英テキスト翻訳

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

辞書ショートカット

すべての辞書の索引

「ValidatorCollection」の関連用語

ValidatorCollectionのお隣キーワード
検索ランキング

   

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



ValidatorCollectionのページの著作権

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

©2026 GRAS Group, Inc.RSS