Visual Basic (Declaration) | |
---|---|
Public Property Encoding As Encoding |
Visual Basic (Usage) | ![]() |
---|---|
Dim instance As Vt Dim value As Encoding instance.Encoding = value value = instance.Encoding |
C# | |
---|---|
public Encoding Encoding {get; set;} |
Managed Extensions for C++ | |
---|---|
public: __property Encoding* get_Encoding(); public: __property void set_Encoding( Encoding* value ); |
Property Value
A System.Text.Encoding value. The default is Encoding.ASCII, which indicates no encoding.When a value other than Encoding.ASCII is used, the Write(Byte[]) method (except the string overload) will decode multibyte data using this encoding. This property provides for the displaying of any Unicode character.
No decoding is attempted when Encoding is set to the default Encoding.ASCII value. Instead, 7- or 8-bit values are used directly.
A remote host may encode characters as multibyte representations. To decode these characters, the display must know what encoding was used; this is where the Encoding property comes into play. With the appropriate Encoding setting, data will be decoded to a sequence of unicode values. When a font supporting the character set is used, the correct visual representations (glyphs) of these unicode characters will be displayed.
Target Platforms: Microsoft .NET Framework 2.0