System Namespace String Class
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.
[ VB ]
<Serializable>
Public Sub New ( _
ByVal value ( ) As Char, _
ByVal startIndex As Integer, _
ByVal length As Integer _
)
[ C# ]
[ Serializable ]
public String (
char [ ] value,
int startIndex,
int length
);
[ C++ ]
[ Serializable ]
public: String (
__wchar_t value __gc [ ],
int startIndex,
int length
);
[ JScript ]
public Serializable
function String (
value : Char [ ],
startIndex : int,
length : int
);
- value
- An array of Unicode characters.
- startIndex
- The starting position within value.
- length
- The number of characters within value to use.
Exception Type |
Condition |
ArgumentNullException |
value is a null reference ( Nothing in Visual Basic ), and startIndex and length are not zero. |
ArgumentOutOfRangeException |
startIndex or length is less than zero.
-or-
The sum of startIndex and length is greater than the number of elements in value.
|
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 ).
String Members String Constructor Overload List Char Int32