ParserErrorCollection.Contains Method

Determines whether the ParserError object is located in the collection.

Namespace: System.Web
Assembly: System.Web (in system.web.dll)

public:
bool Contains (
	ParserError^ value
)
public boolean Contains (
	ParserError value
)
public function Contains (
	value : ParserError
) : boolean
Not applicable.

Parameters

value

The ParserError to locate in the collection.

Return Value

true if the ParserError is in the collection; otherwise, false.

You cannot add the same ParserError object to the collection more than once. However, attempting to add a ParserError object more than once will not throw an exception. Instead, the addition will fail. In this case, the Add method will return a value of –1. However, the AddRange and Insert methods do not have return values. When adding ParserError objects by using one of these methods, use the Contains method to determine whether a particular ParserError object is already in the collection.

The following code example demonstrates how to search for an instance of a specified ParserError object in a ParserErrorCollection object.

No code example is currently available or this language may not be supported.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show: