- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to convert an array of characters into a string in C#?
Let us first set an array of 5 characters −
char[] ch = new char[15]; ch[0] = 'T'; ch[1] = 'r'; ch[2] = 'i'; ch[3] = 'c'; ch[4] = 'k';
Now convert them into a string −
string str = new string(ch);
Here is the complete code −
Example
Using System; class Program { static void Main() { char[] ch = new char[15]; ch[0] = 'T'; ch[1] = 'r'; ch[2] = 'i'; ch[3] = 'c'; ch[4] = 'k'; // converting to string string str = new string(ch); Console.WriteLine(str); } }
- Related Articles
- How to convert a list of characters into a string in C#?
- C# program to convert a list of characters into a string
- How to convert an array into JavaScript string?
- Convert a String into a square matrix grid of characters in C++
- How to convert a tuple into an array in C#?
- Java program to convert a list of characters into a string
- How can we convert a list of characters into a string in Python?
- Convert characters of a string to opposite case in C++
- How to convert a string into int in C#?
- How to convert an array into a complex array JavaScript?
- How to Convert Hashtable into an Array?
- How to convert a list into an array in R?
- How to convert an array into a matrix in R?
- How to convert a 2D array into 1D array in C#?
- How to split a string into elements of a string array in C#?

Advertisements