CookieCollection Class

 

Provides a collection container for instances of the Cookie class.

Namespace:   System.Net
Assembly:  System (in System.dll)

System::Object
  System.Net::CookieCollection

[SerializableAttribute]
public ref class CookieCollection : ICollection, IEnumerable

NameDescription
System_CAPS_pubmethodCookieCollection()

Initializes a new instance of the CookieCollection class.

NameDescription
System_CAPS_pubpropertyCount

Gets the number of cookies contained in a CookieCollection.

System_CAPS_pubpropertyIsReadOnly

Gets a value that indicates whether a CookieCollection is read-only.

System_CAPS_pubpropertyIsSynchronized

Gets a value that indicates whether access to a CookieCollection is thread safe.

System_CAPS_pubpropertyItem[Int32]

Gets the Cookie with a specific index from a CookieCollection.

System_CAPS_pubpropertyItem[String^]

Gets the Cookie with a specific name from a CookieCollection.

System_CAPS_pubpropertySyncRoot

Gets an object to synchronize access to the CookieCollection.

NameDescription
System_CAPS_pubmethodAdd(Cookie^)

Adds a Cookie to a CookieCollection.

System_CAPS_pubmethodAdd(CookieCollection^)

Adds the contents of a CookieCollection to the current instance.

System_CAPS_pubmethodCopyTo(Array^, Int32)

Copies the elements of a CookieCollection to an instance of the Array class, starting at a particular index.

System_CAPS_pubmethodCopyTo(array<Cookie^>^, Int32)

Copies the elements of this CookieCollection to a Cookie array starting at the specified index of the target array.

System_CAPS_pubmethodEquals(Object^)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetEnumerator()

Gets an enumerator that can iterate through a CookieCollection.

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

NameDescription
System_CAPS_pubmethodAsParallel()

Overloaded. Enables parallelization of a query.(Defined by ParallelEnumerable.)

System_CAPS_pubmethodAsQueryable()

Overloaded. Converts an IEnumerable to an IQueryable.(Defined by Queryable.)

System_CAPS_pubmethodCast<TResult>()

Casts the elements of an IEnumerable to the specified type.(Defined by Enumerable.)

System_CAPS_pubmethodOfType<TResult>()

Filters the elements of an IEnumerable based on a specified type.(Defined by Enumerable.)

The CookieCollection class implements an ICollection interface to provide a general mechanism for handling collections of cookies. For example, this is useful in the case where an application is designed to store cookies for multiple servers.

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 3.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: