コレクションに指定した CodeParameterDeclarationExpression が格納されているかどうかを示す値を取得します。
Public Function Contains( _
ByVal value As CodeParameterDeclarationExpression _) As Boolean
[C#]
public bool Contains(CodeParameterDeclarationExpressionvalue);
[C++]
public: bool Contains(CodeParameterDeclarationExpression* value);
[JScript]
public function Contains(
value : CodeParameterDeclarationExpression) : Boolean;
パラメータ
- value
コレクション内で検索される CodeParameterDeclarationExpression 。
戻り値
コレクションに指定したオブジェクトが格納されている場合は true 。それ以外の場合は false 。
使用例
' Tests for the presence of a CodeParameterDeclarationExpression
' in the collection, and retrieves its index if it is found.
Dim testParameter As New CodeParameterDeclarationExpression(GetType(Integer), "testIntArgument")
Dim itemIndex As Integer = -1
If collection.Contains(testParameter) Then
itemIndex = collection.IndexOf(testParameter)
End If
[C#]
// Tests for the presence of a CodeParameterDeclarationExpression
// in the collection, and retrieves its index if it is found.
CodeParameterDeclarationExpression testParameter = new CodeParameterDeclarationExpression(typeof(int), "testIntArgument");
int itemIndex = -1;
if( collection.Contains( testParameter ) )
itemIndex = collection.IndexOf( testParameter );
[C++]
// Tests for the presence of a CodeParameterDeclarationExpression
// in the collection, and retrieves its index if it is found.
CodeParameterDeclarationExpression* testParameter = new CodeParameterDeclarationExpression(__typeof(int), S"testIntArgument");
int itemIndex = -1;
if( collection->Contains( testParameter ) )
itemIndex = collection->IndexOf( testParameter );
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
参照
CodeParameterDeclarationExpressionCollection クラス | CodeParameterDeclarationExpressionCollection メンバ | System.CodeDom 名前空間 | IndexOf