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!

UnicodeEncoding.GetByteCount

Returns the number of bytes required to encode a range of characters in the specified array.

[Visual Basic]
Overrides Public Function GetByteCount( _
   ByVal chars() As Char, _
   ByVal index As Integer, _
   ByVal count As Integer _
) As Integer
[C#]
public override int GetByteCount(
   char[] chars,
   int index,
   int count
);
[C++]
public: override int GetByteCount(
   __wchar_t* chars[],
   int index,
   int count
);
[JScript]
public override function GetByteCount(
   chars : Char[],
   index : int,
   count : int
) : int;

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

The number of bytes required to encode a range of characters in the specified character array.

Exceptions

Exception Type Condition
ArgumentNullException The chars parameter is a null reference (in Visual Basic Nothing).
ArgumentOutOfRangeException The index and count parameters do not denote a valid range in the character array.

Remarks

This method overrides GetByteCount.

See Also

UnicodeEncoding Class | UnicodeEncoding Members | System.Text Namespace | GetByteCount