CompilerErrorCollection::Contains Method (CompilerError^)
.NET Framework (current version)
Gets a value that indicates whether the collection contains the specified CompilerError object.
Assembly: System (in System.dll)
Parameters
- value
-
Type:
System.CodeDom.Compiler::CompilerError^
The CompilerError to locate.
Return Value
Type: System::Booleantrue if the CompilerError is contained in the collection; otherwise, false.
The following example uses the Contains method to locate a specific CompilerError object and determine the index value at which it was found.
// Tests for the presence of a CompilerError in the // collection, and retrieves its index if it is found. CompilerError^ testError = gcnew CompilerError( "Testfile.cs",5,10,"CS0001","Example error text" ); int itemIndex = -1; if ( collection->Contains( testError ) ) itemIndex = collection->IndexOf( testError );
.NET Framework
Available since 1.1
Available since 1.1
Show: