String..::..ToCharArray Method (Int32, Int32)
Copies the characters in a specified substring in this instance to a Unicode character array.
Namespace:
SystemAssembly: Bridge (in Bridge.dll)
Syntax
[TemplateAttribute] public char[] ToCharArray( int startIndex, int count )
<TemplateAttribute> _ Public Function ToCharArray ( _ startIndex As Integer, _ count As Integer _ ) As Char()
[TemplateAttribute] public: array<wchar_t^>^ ToCharArray( int^ startIndex, int^ count )
Parameters
- startIndex
- Type: System..::..Int32
The starting position of a substring in this instance.
- count
- Type: System..::..Int32
Return Value
A Unicode character array whose elements are the length number of characters in this instance starting from character position startIndex.Exceptions
Exception | Condition |
---|---|
System..::..ArgumentOutOfRangeException | startIndex or length is less than zero.-or- startIndex plus length is greater than the length of this instance. |