Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

Encoding.GetBytes Method (Char[])

.NET Framework 1.1

Encodes a specified character array into a byte array.

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

Parameters

chars
The character array to encode.

Return Value

A byte array containing the encoded representation of chars.

Exceptions

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

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard

See Also

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

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.