Mono Class Library: System.String Overview | Members

System.String Constructor

Constructs and initializes a new instance of string using an array of Unicode characters, the index within array at which to start copying characters, and the number of characters to be copied.

public String (char[] value, int startIndex, int length)

Parameters

value
An array of Unicode characters.
startIndex
A int containing the index within the array referenced by value from which to start copying.
length
A int containing the number of characters to copy from the value array. If length is zero, string.Empty is created.

Exceptions

TypeReason
ArgumentNullExceptionvalue is a null reference.
ArgumentOutOfRangeException

startIndex or length is less than zero.

-or-

The sum of startIndex and length is greater than the number of elements in value .

Remarks

This constructor copies the sequence Unicode characters found at value between indexes startIndex and startIndex + length - 1.

Requirements

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