asp.net.ph

String Constructor ( Char [ ], Int32, Int32 )

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
);

Parameters

value
An array of Unicode characters.
startIndex
The starting position within value.
length
The number of characters within value to use.

Exceptions


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.


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 ).

See Also

String Members   String Constructor Overload List   Char   Int32 Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph