C# Program to concatenate two strings
In this C# program, we will take the input strings from the user and print the concatenated string.
C# Program to concatenate two strings Code:
private static void Main(string[] args)
{
string str1,str2,result;
Console.Write("Enter first string : ");
str1 = Console.ReadLine();
Console.Write("Enter second string : ");
str2 = Console.ReadLine();
result = string.Concat(str1, str2);
Console.Write("Output: "+result);
Console.ReadLine();
}
C# Program to concatenate two strings Output: