Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
How to concatenate Two Arrays in C#?
To concatenate two arrays in C#, let us first declare and initialize the array. Here, we have considered a string array −
string[] str = new string[] { "Hello","World" };
Now let us use the join() method to concatenate −.
string.Join(" ", str);
Now let us see the complete code to concatenate two arrays.
Example
using System;
class Program {
static void Main() {
string[] str = new string[] { "Hello","World" };
string res = string.Join(" ", str);
Console.WriteLine(res);
}
}
Output
Hello World
Advertisements
