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.GetByteCount (Char[])

Returns the number of bytes required to encode a specified character array.

[Visual Basic]
Overloads Overridable Public Function GetByteCount( _
   ByVal chars() As Char _
) As Integer
[C#]
public virtual int GetByteCount(
   char[] chars
);
[C++]
public: virtual int GetByteCount(
   __wchar_t* chars[]
);
[JScript]
public function GetByteCount(
   chars : Char[]
) : int;

Parameters

chars
The character array to encode.

Return Value

The number of bytes needed to encode chars.

Exceptions

Exception Type Condition
ArgumentNullException chars is a null reference (in Visual Basic Nothing).

See Also

Encoding Class | Encoding Members | System.Text Namespace | Encoding.GetByteCount Overload List