Encodes a character array into a byte array with no specified range.
[Visual Basic] Overloads Overridable Public Function GetBytes( _ ByVal chars() As Char _ ) As Byte () [C#] public virtual byte[] GetBytes( char[] chars ); [C++] public: virtual unsigned char* GetBytes( __wchar_t* chars[] ) []; [JScript] public function GetBytes( chars : Char[] ) : Byte[];
An array of type Byte containing the encoded representation of the specified character array.
Exception Type | Condition |
---|---|
ArgumentNullException | chars is a null reference (in Visual Basic Nothing). |
Encoding Class | Encoding Members | System.Text Namespace | Encoding.GetBytes Overload List | GetByteCount | GetMaxByteCount | GetDecoder | GetEncoder