How to concatenate two strings in C#

Concatenation is the process of appending one string to the end of another. In C#, any two strings can be concatenated using the + operator.

svg viewer

Code

The code snippet below illustrates the process of concatenating two strings in C#:

class HelloWorld
{
static void Main()
{
string FirstString = "Hello";
string SecondString = "World";
string ConcatenatedString = FirstString + SecondString;
System.Console.WriteLine(ConcatenatedString);
}
}
New on Educative
Learn to Code
Learn any Language as a beginner
Develop a human edge in an AI powered world and learn to code with AI from our beginner friendly catalog
🏆 Leaderboard
Daily Coding Challenge
Solve a new coding challenge every day and climb the leaderboard

Free Resources

Copyright ©2025 Educative, Inc. All rights reserved