CodeTypeReferenceCollection.Contains(CodeTypeReference) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a value indicating whether the collection contains the specified CodeTypeReference.
public:
bool Contains(System::CodeDom::CodeTypeReference ^ value);
public bool Contains (System.CodeDom.CodeTypeReference value);
member this.Contains : System.CodeDom.CodeTypeReference -> bool
Public Function Contains (value As CodeTypeReference) As Boolean
Parameters
- value
- CodeTypeReference
The CodeTypeReference to search for in the collection.
Returns
true
if the CodeTypeReference is contained in the collection; otherwise, false
.
Examples
// Tests for the presence of a CodeTypeReference in the
// collection, and retrieves its index if it is found.
CodeTypeReference^ testReference = gcnew CodeTypeReference( bool::typeid );
int itemIndex = -1;
if ( collection->Contains( testReference ) )
itemIndex = collection->IndexOf( testReference );
// Tests for the presence of a CodeTypeReference in the
// collection, and retrieves its index if it is found.
CodeTypeReference testReference = new CodeTypeReference(typeof(bool));
int itemIndex = -1;
if( collection.Contains( testReference ) )
itemIndex = collection.IndexOf( testReference );
' Tests for the presence of a CodeTypeReference in the
' collection, and retrieves its index if it is found.
Dim testReference As New CodeTypeReference(GetType(Boolean))
Dim itemIndex As Integer = -1
If collection.Contains(testReference) Then
itemIndex = collection.IndexOf(testReference)
End If
Applies to
See also
Dolgozzon együtt velünk a GitHubon
A tartalom forrása a GitHubon található, ahol létrehozhat és áttekinthet problémákat és lekéréses kérelmeket is. További információért tekintse meg a közreműködői útmutatónkat.