WebClient.Encoding Property
Silverlight
Gets and sets the Encoding used to upload and download strings.
Namespace: System.Net
Assembly: System.Net (in System.Net.dll)
| Exception | Condition |
|---|---|
| ArgumentNullException |
A null value was passed to set this property. |
The UploadStringAsync methods use this property to convert the specified string to a Byte array before uploading the string. For additional information, see the GetBytes method.
When a string is downloaded using the DownloadStringAsync methods, WebClient uses the Encoding returned by this to convert the downloaded Byte array into a string. For additional information, see the GetString method.
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.