Share via


String Constructor (Char[], Int32, Int32)

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Initializes a new instance of the String class to the value indicated by an array of Unicode characters, a starting character position within that array, and a length.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

Syntax

'Declaration
Public Sub New ( _
    value As Char(), _
    startIndex As Integer, _
    length As Integer _
)
public String(
    char[] value,
    int startIndex,
    int length
)
public:
String(
    array<wchar_t>^ value, 
    int startIndex, 
    int length
)
new : 
        value:char[] * 
        startIndex:int * 
        length:int -> String
public function String(
    value : char[], 
    startIndex : int, 
    length : int
)

Parameters

Remarks

If length is zero, an Empty instance is initialized.

This constructor copies Unicode characters from value, starting at startIndex and ending at (startIndex + length - 1).

.NET Framework Security

See Also

Reference

String Class

String Overload

System Namespace