PowerTCP Emulation for .NET CF
Encoding Property
See Also  Send comments on this topic.
Dart.Emulation Namespace > Vt Class : Encoding Property




Gets or sets a value which indicates the encoding to use when sending or receiving multibyte data.

Syntax

Visual Basic (Declaration) 
Public Property Encoding As Encoding
Visual Basic (Usage)Copy Code
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
);
C++/CLI 
public:
property Encoding^ Encoding {
   Encoding^ get();
   void set (    Encoding^ value);
}

Property Value

A System.Text.Encoding value. The default is Encoding.ASCII, which indicates no encoding.

Remarks

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.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

Documentation Version 4.2
© 2010 Dart Communications. All Rights Reserved.