This documentation is archived and is not being maintained.

Encoding.GetByteCount Method

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

Overload List

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

Supported by the .NET Compact Framework.

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

Calculates the number of bytes required to encode the specified String.

Supported by the .NET Compact Framework.

[Visual Basic] Overloads Public Overridable Function GetByteCount(String) As Integer
[C#] public virtual int GetByteCount(string);
[C++] public: virtual int GetByteCount(String*);
[JScript] public function GetByteCount(String) : int;

When overridden in a derived class, returns the number of bytes required to encode a range of characters in the specified character array.

Supported by the .NET Compact Framework.

[Visual Basic] Overloads Public MustOverride Function GetByteCount(Char(), Integer, Integer) As Integer
[C#] public abstract int GetByteCount(char[], int, int);
[C++] public: virtual int GetByteCount(__wchar_t __gc[], int, int) = 0;
[JScript] public abstract function GetByteCount(Char[], int, int) : int;

See Also

Encoding Class | Encoding Members | System.Text Namespace

Show: