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

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

MatchCollection.Count プロパティ

キャプチャの数を取得します。

名前空間: System.Text.RegularExpressions
アセンブリ: System (system.dll 内)
構文構文

解説解説

一致する対象をすべて見つけるために、Count プロパティにアクセスした直後に正規表現エンジンを実行する必要があります。しかし、一致する対象を列挙するために GetEnumerator が使用されている場合は、正規表現エンジンは必要な検索だけを実行します。

使用例使用例

このプロパティの使用方法を示すコード例を次に示します。

// Report the number of matches found.
Console.WriteLine("{0} matches found.", matches.Count);
// Report the number of matches found.
Console::WriteLine( "{0} matches found.", matches->Count );
// Report the number of matches found.
Console.WriteLine("{0} matches found.", (Int32)matches.get_Count());
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
MatchCollection クラス
MatchCollection メンバ
System.Text.RegularExpressions 名前空間



英和和英テキスト翻訳

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

辞書ショートカット

すべての辞書の索引

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

   

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



MatchCollection.Count プロパティのページの著作権

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

©2026 GRAS Group, Inc.RSS