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.

HttpLanguageRangeWithQualityHeaderValueCollection.IndexOf method

Applies to Windows and Windows Phone

Determines the index of a specific item in the collection.

Syntax


Public Function IndexOf(
  item As HttpLanguageRangeWithQualityHeaderValue 
) As Integer

Parameters

item

Type: HttpLanguageRangeWithQualityHeaderValue

The object to locate in the collection.

Return value

Type: System.Int32

The index of item if found in the collection; otherwise, –1.

Remarks

IndexOf won't throw an exception if the element specified as item doesn't exist in the collection. Instead, it will return -1, which is a special value that isn't valid as a true index.

If you have an index for an element that exists in the collection but not a reference, you can use the Item (indexer) property of HttpLanguageRangeWithQualityHeaderValueCollection to get or set a value by index.

If you are programming using Visual C++ component extensions (C++/CX) or JavaScript, see IndexOf.

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

HttpLanguageRangeWithQualityHeaderValueCollection
Item (indexer)

 

 

Show:
© 2014 Microsoft