CodeStatementCollection.Contains(CodeStatement) Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Koleksiyonun belirtilen CodeStatement nesneyi içerip içermediğini gösteren bir değer alır.
public:
bool Contains(System::CodeDom::CodeStatement ^ value);
public bool Contains (System.CodeDom.CodeStatement value);
member this.Contains : System.CodeDom.CodeStatement -> bool
Public Function Contains (value As CodeStatement) As Boolean
Parametreler
- value
- CodeStatement
CodeStatement Koleksiyonda aranacak nesne.
Döndürülenler
true koleksiyon belirtilen nesneyi içeriyorsa; aksi takdirde , false.
Örnekler
Aşağıdaki örnek, belirli CodeStatement bir varlığı aramak ve bulunduğu dizin değerini almak için yöntemini kullanırContains.
// Tests for the presence of a CodeStatement in the
// collection, and retrieves its index if it is found.
int itemIndex = -1;
if ( collection->Contains( testStatement ) )
itemIndex = collection->IndexOf( testStatement );
// Tests for the presence of a CodeStatement in the
// collection, and retrieves its index if it is found.
int itemIndex = -1;
if( collection.Contains( testStatement ) )
itemIndex = collection.IndexOf( testStatement );
' Tests for the presence of a CodeStatement in the
' collection, and retrieves its index if it is found.
Dim itemIndex As Integer = -1
If collection.Contains(testStatement) Then
itemIndex = collection.IndexOf(testStatement)
End If