MultipartFormDataContent::Add Method (HttpContent^, String^)

.NET Framework (current version)
 

Add HTTP content to a collection of HttpContent objects that get serialized to multipart/form-data MIME type.

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

public:
void Add(
	HttpContent^ content,
	String^ name
)

Parameters

content
Type: System.Net.Http::HttpContent^

The HTTP content to add to the collection.

name
Type: System::String^

The name for the HTTP content to add.

Exception Condition
ArgumentException

The name was null or contains only white space characters.

ArgumentNullException

The content was null.

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: