CookieCollection Class
Provides a collection container for instances of the Cookie class.
Assembly: System (in System.dll)
| Name | Description | |
|---|---|---|
![]() | CookieCollection() | Initializes a new instance of the CookieCollection class. |
| Name | Description | |
|---|---|---|
![]() | Count | Gets the number of cookies contained in a CookieCollection. |
![]() | IsReadOnly | Gets a value that indicates whether a CookieCollection is read-only. |
![]() | IsSynchronized | Gets a value that indicates whether access to a CookieCollection is thread safe. |
![]() | Item[Int32] | Gets the Cookie with a specific index from a CookieCollection. |
![]() | Item[String^] | Gets the Cookie with a specific name from a CookieCollection. |
![]() | SyncRoot | Gets an object to synchronize access to the CookieCollection. |
| Name | Description | |
|---|---|---|
![]() | Add(Cookie^) | Adds a Cookie to a CookieCollection. |
![]() | Add(CookieCollection^) | Adds the contents of a CookieCollection to the current instance. |
![]() | CopyTo(Array^, Int32) | Copies the elements of a CookieCollection to an instance of the Array class, starting at a particular index. |
![]() | CopyTo(array<Cookie^>^, Int32) | Copies the elements of this CookieCollection to a Cookie array starting at the specified index of the target array. |
![]() | Equals(Object^) | Determines whether the specified object is equal to the current object.(Inherited from Object.) |
![]() | Finalize() | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.) |
![]() | GetEnumerator() | Gets an enumerator that can iterate through a CookieCollection. |
![]() | GetHashCode() | Serves as the default hash function. (Inherited from Object.) |
![]() | GetType() | |
![]() | MemberwiseClone() | |
![]() | ToString() | Returns a string that represents the current object.(Inherited from Object.) |
| Name | Description | |
|---|---|---|
![]() | AsParallel() | Overloaded. Enables parallelization of a query.(Defined by ParallelEnumerable.) |
![]() | AsQueryable() | Overloaded. Converts an IEnumerable to an IQueryable.(Defined by Queryable.) |
![]() | Cast<TResult>() | Casts the elements of an IEnumerable to the specified type.(Defined by Enumerable.) |
![]() | OfType<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.
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.


