Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

HttpExpectationHeaderValueCollection.Contains method

Applies to Windows and Windows Phone

Determines whether an element is in the collection.

Syntax


public bool Contains(
  HttpExpectationHeaderValue item
)

Parameters

item

Type: HttpExpectationHeaderValue

The item to find in the collection.

Return value

Type: System.Boolean

true if the item was found in the collection; otherwise, false.

Remarks

You can also call IndexOf to get the index of a specific item in the collection. If the element you specify doesn't exist, IndexOf returns -1, so that's another way to determine that the collection doesn't contain a given element.

If you are programming using Visual C++ component extensions (C++/CX) or JavaScript, there is no equivalent for Contains. You should iterate through the collection by calling First, and check each item for equality against the element you are looking for.

Requirements

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Web.Http.Headers

See also

HttpExpectationHeaderValueCollection
IndexOf

 

 

Show:
© 2014 Microsoft