Redigera

Dela via


MultipartContent.GetEnumerator Method

Definition

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

public:
 virtual System::Collections::Generic::IEnumerator<System::Net::Http::HttpContent ^> ^ GetEnumerator();
public System.Collections.Generic.IEnumerator<System.Net.Http.HttpContent> GetEnumerator ();
abstract member GetEnumerator : unit -> System.Collections.Generic.IEnumerator<System.Net.Http.HttpContent>
override this.GetEnumerator : unit -> System.Collections.Generic.IEnumerator<System.Net.Http.HttpContent>
Public Function GetEnumerator () As IEnumerator(Of HttpContent)

Returns

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

Implements

Remarks

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.

Applies to