System.Net.WebClient.Encoding Property

Gets and sets the System.Text.Encoding used to upload and download strings.

Syntax

public System.Text.Encoding Encoding { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

The erload:System.Net.WebClient.UploadString and erload:System.Net.WebClient.UploadStringAsync methods use this property to convert the specified string to a byte array before uploading the string. For additional information, see the erload:System.Text.Encoding.GetBytes method.

When a string is downloaded using the erload:System.Net.WebClient.DownloadString or erload:System.Net.WebClient.DownloadStringAsync methods, System.Net.WebClient uses the System.Text.Encoding returned by this to convert the downloaded byte array into a string. For additional information, see the erload:System.Text.Encoding.GetString method.

Requirements

Namespace: System.Net
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0