System.Web.ParserErrorCollection.Contains Method

Determines whether the System.Web.ParserError object is located in the collection.

Syntax

public bool Contains (ParserError error)

Parameters

error
Documentation for this section has not yet been entered.

Returns

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

Remarks

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

Requirements

Namespace: System.Web
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0