MultipartContent::GetEnumerator Method ()

.NET Framework (current version)
 

Returns an enumerator that iterates through the collection of HttpContent objects that get serialized using the multipart/* content type specification..

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

public:
virtual IEnumerator<HttpContent^>^ GetEnumerator() sealed

Return Value

Type: System.Collections.Generic::IEnumerator<HttpContent^>^

An object that can be used to iterate through the collection.

The foreach statement of the C# language (For Each in Visual Basic) hides the complexity of the enumerators. Therefore, using foreach is recommended, instead of directly manipulating the enumerator.

Enumerators can be used to read the data in the collection, but they cannot be used to modify the underlying collection.

Initially, the enumerator is positioned before the first element in the collection.

Universal Windows Platform
Available since 8
.NET Framework
Available since 4.5
Portable Class Library
Supported in: portable .NET platforms
Windows Phone
Available since 8.1
Return to top
Show: