Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
StringContent Constructor (String, Encoding, String)

StringContent Constructor (String, Encoding, String)

.NET Framework 4.6 and 4.5

Creates a new instance of the StringContent class.

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

public StringContent(
	string content,
	Encoding encoding,
	string mediaType
)

Parameters

content
Type: System.String

The content used to initialize the StringContent.

encoding
Type: System.Text.Encoding

The encoding to use for the content.

mediaType
Type: System.String

The media type to use for the content.

.NET Framework

Supported in: 4.6, 4.5

.NET for Windows Phone apps

Supported in: Windows Phone 8.1
Show:
© 2015 Microsoft