Converts a byte array from one encoding to another.
[Visual Basic] Overloads Public Shared Function Convert( _ ByVal srcEncoding As Encoding, _ ByVal dstEncoding As Encoding, _ ByVal bytes() As Byte _ ) As Byte () [C#] public static byte[] Convert( Encoding srcEncoding, Encoding dstEncoding, byte[] bytes ); [C++] public: static unsigned char* Convert( Encoding* srcEncoding, Encoding* dstEncoding, unsigned char* bytes[] ) []; [JScript] public static function Convert( srcEncoding : Encoding, dstEncoding : Encoding, bytes : Byte[] ) : Byte[];
An array of type Byte containing the result of the conversion.
Exception Type | Condition |
---|---|
ArgumentException | srcEncoding, dstEncoding or bytes is a null reference (in Visual Basic Nothing). |
The bytes in the byte array are converted from srcEncoding to dstEncoding.
Encoding Class | Encoding Members | System.Text Namespace | Encoding.Convert Overload List