CodeCommentStatementCollection.Contains メソッド
指定した CodeCommentStatement がコレクションに格納されているかどうかを示す値を取得します。
名前空間: System.CodeDom
アセンブリ: System (system.dll 内)
構文
Dim instance As CodeCommentStatementCollection Dim value As CodeCommentStatement Dim returnValue As Boolean returnValue = instance.Contains(value)
戻り値
CodeCommentStatement がコレクションに格納されている場合は true。それ以外の場合は false。

' Tests for the presence of a CodeCommentStatement in the ' collection, and retrieves its index if it is found. Dim testComment As New CodeCommentStatement("Test comment") Dim itemIndex As Integer = -1 If collection.Contains(testComment) Then itemIndex = collection.IndexOf(testComment) End If
// Tests for the presence of a CodeCommentStatement in the // collection, and retrieves its index if it is found. CodeCommentStatement testComment = new CodeCommentStatement("Test comment"); int itemIndex = -1; if( collection.Contains( testComment ) ) itemIndex = collection.IndexOf( testComment );
// Tests for the presence of a CodeCommentStatement in the // collection, and retrieves its index if it is found. CodeCommentStatement^ testComment = gcnew CodeCommentStatement( "Test comment" ); int itemIndex = -1; if ( collection->Contains( testComment ) ) itemIndex = collection->IndexOf( testComment );

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


- CodeCommentStatementCollection.Contains メソッドのページへのリンク