Android Guides | Samples

Java.Lang.String.CopyValueOf Method

Creates a new string by copying the given subsequence of the given char[].

Syntax

[Android.Runtime.Register("copyValueOf", "([CII)Ljava/lang/String;", "")]
public static String CopyValueOf (Char[] data, Int32 start, Int32 length)

Parameters

data
the array of characters.
start
the starting offset in the character array.
length
the number of characters to use.

Exceptions

TypeReason
NullPointerExceptionif data is null.
IndexOutOfBoundsExceptionif length or start + length > data.length.

Remarks

Creates a new string by copying the given subsequence of the given char[]. Modifying the array after creating the string has no effect on the string.

[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