Copies a specified number of characters from a specified position in this instance to a specified position in an array of Unicode characters.
Namespace: SystemAssembly: mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax public void CopyTo(
int sourceIndex,
char[] destination,
int destinationIndex,
int count
)
Parameters
- sourceIndex
- Type: SystemInt32
The index of the first character in this instance to copy. - destination
- Type: SystemChar
An array of Unicode characters to which characters in this instance are copied. - destinationIndex
- Type: SystemInt32
The index in destination at which the copy operation begins. - count
- Type: SystemInt32
The number of characters in this instance to copy to destination.
Exceptions Exception | Condition |
---|
ArgumentNullException | destination is null. |
ArgumentOutOfRangeException | sourceIndex, destinationIndex, or count is negative -or- count is greater than the length of the substring from startIndex to the end of this instance -or- count is greater than the length of the subarray from destinationIndex to the end of destination |
See Also