CodeParameterDeclarationExpressionCollection.Contains メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
コレクションに指定した CodeParameterDeclarationExpressionが含まれているかどうかを示す値を取得します。
public:
bool Contains(System::CodeDom::CodeParameterDeclarationExpression ^ value);
public bool Contains(System.CodeDom.CodeParameterDeclarationExpression value);
member this.Contains : System.CodeDom.CodeParameterDeclarationExpression -> bool
Public Function Contains (value As CodeParameterDeclarationExpression) As Boolean
パラメーター
コレクション内で検索する CodeParameterDeclarationExpression 。
返品
true コレクションに指定したオブジェクトが含まれている場合は 〗。それ以外の場合は false。
例
次の例では、 Contains メソッドを使用して、特定の CodeParameterDeclarationExpression オブジェクトの存在を検索し、検出されたインデックス値を取得します。
// 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 );
' 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