Javatpoint Logo
Javatpoint Logo

C# String CopyTo()

The C# CopyTo() method is used to copy a specified number of characters from the specified position in the string. It copies the characters of this string into a char array.

Signature

Parameter

index: it is an integer type parameter. It is an index of string.

ch: it is a char type array.

start: it is start index of char type array.

end: it is end index of char type array.


C# String CopyTo() Method Example

Output:

How Are You?




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


B.Tech / MCA