NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

String Constructor (Char[], Int32, Int32)

Initializes an instance of the string class from the characters in a subarray.

[Visual Basic]
Overloads Public Sub New( _
   ByVal value() As Char, _
   ByVal startIndex As Integer, _
   ByVal length As Integer _
)
[C#]
public String(
   char[] value,
   int startIndex,
   int length
);
[C++]
public: String(
   __wchar_t* value[],
   int startIndex,
   int length
);
[JScript]
public function String(
   value : Char[],
   startIndex : int,
   length : int
);

Parameters

value
An array of characters.
startIndex
The position where the array begins.
length
The length of the array.

Exceptions

Exception Type Condition
ArgumentNullException If value is null.
ArgumentOutOfRangeException If the starting position or if the combined starting position and length of the string are not valid indices of the array.

Remarks

This constructor initializes an new string that is created from a subarray. The new String will contain the number of characters (length) from the array (value) that begins at the position indicated (startIndex).

An exception will be thrown if startIndex or (startIndex + length -1) are not valid indices.

See Also

String Class | String Members | System Namespace | String Constructor Overload List | Char | Int32