Mono Class Library: System.Text.Encoding Overview | Members

System.Text.Encoding.GetBytes Method

Encodes the specified string.

public virtual byte[] GetBytes (string s)

Parameters

s
The string to encode.

Returns

A byte array containing the encoded representation of s.

Exceptions

TypeReason
ArgumentNullExceptions is null.

Remarks

Operation
As described above.

Note to Inheritors
This method is overridden by types derived from System.Text.Encoding to perform the encoding.

Requirements

Namespace: System.Text
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0