NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Encoding.GetBytes (Char[], Int32, Int32)

Encodes a range of characters from a character array into a byte array.

[Visual Basic]
Overloads Overridable Public Function GetBytes( _
   ByVal chars() As Char, _
   ByVal index As Integer, _
   ByVal count As Integer _
) As Byte ()
[C#]
public virtual byte[] GetBytes(
   char[] chars,
   int index,
   int count
);
[C++]
public: virtual unsigned char* GetBytes(
   __wchar_t* chars[],
   int index,
   int count
) [];
[JScript]
public function GetBytes(
   chars : Char[],
   index : int,
   count : int
) : Byte[];

Parameters

chars
The character array to encode.
index
The starting index of the character array to encode.
count
The number of characters to encode.

Return Value

An array of type Byte containing the encoded representation of a range of characters in the specified character array.

Exceptions

Exception Type Condition
ArgumentException The chars argument is null.The index and count arguments do not denote a valid range in the character array.

See Also

Encoding Class | Encoding Members | System.Text Namespace | Encoding.GetBytes Overload List | GetByteCount | GetMaxByteCount | GetDecoder | GetEncoder