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:

CSharp-program-to-concatenate-two-strings

 
We are nothing without our users ! You can help us offer even more high quality content. Please share our page !
Best quality Asp .Net Ajax Control Toolkit tutorials.

Give your valuable comments.

Name
Email
Comment
6 + 3 =
 
About Us | Terms of Use | Privacy Policy | Disclaimer | Contact Us Copyright © 2012-2022 CodingFusion
75 Important SQL Server queries you should know