A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/c-sharp/c-sharp-tochararray-method/ below:

C# | ToCharArray() Method - GeeksforGeeks

C# | ToCharArray() Method

Last Updated : 11 Jul, 2025

In C#,

ToCharArray()

is a string method. This method is used to copy the characters from a

specified string

in the current instance to a Unicode character array or the characters of a

specified substring

in the current instance to a Unicode character array. This method can be overloaded by changing the number of arguments passed to it.

Syntax:
public char[] ToCharArray()
or
public char[] ToCharArray(int startIndex, int length)
Explanation: Important Points:

Below are the programs to demonstrate the above Methods :

References :

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4