This post will discuss how to convert char array to string in C#.

1. Using string constructor

The standard solution to convert the character array into a string is using the String class constructor. The string class has a constructor which takes a character array as a parameter and initializes a new instance of the String class with the corresponding characters. The following example instantiates a string from a character array.

Download  Run Code

 
The String constructor is overloaded to accept a character array as an argument, along with the starting position and length.

Download  Run Code

2. Using String.Join Method

Another option is using the String.Join method to concatenate elements of an array with a separator. The following code example demonstrates the usage of the String.Join method for concatenating characters using an empty string as a separator.

Download  Run Code

3. Using String.Concat Method

A better alternative to concatenate the members of a character array without any delimiters is with the convenience method String.Concat(). For example,

Download  Run Code

That’s all about converting char array to string in C#.