Windows Dev Center

HttpCookiePairHeaderValueCollection.Add method

Adds a new item to the end of the collection.

Syntax


public void Add(
  HttpCookiePairHeaderValue item
)

Parameters

item

Type: HttpCookiePairHeaderValue

The new item to add.

Remarks

After you've added an item, you can use the Item indexer to get it by index, or you can use the item reference to continue to refer to that object after it's added to the collection. Or use Contains to verify that a given item exists in a collection.

To add an item to a position in the collection that's not at the collection end, use Insert.

If you are programming using Visual C++ component extensions (C++/CX) or JavaScript, the equivalent method is Append.

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

HttpCookiePairHeaderValueCollection
Append
Item

 

 

Show:
© 2015 Microsoft