Java.Lang.String.GetBytes Method
Returns a new byte array containing the code points in this string encoded using the system's Java.Nio.Charset.Charset.DefaultCharset.

Syntax

[Android.Runtime.Register("getBytes", "()[B", "")]
public byte[] GetBytes ()

Returns

Documentation for this section has not yet been entered.

Remarks

Returns a new byte array containing the code points in this string encoded using the system's Java.Nio.Charset.Charset.DefaultCharset.

The behavior when this string cannot be represented in the system's default charset is unspecified. In practice, when the default charset is UTF-8 (as it is on Android), all strings can be encoded.

[Android Documentation]

Requirements

Namespace: Java.Lang
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1