w3resource
C# Sharp Programming Exercises

C# Sharp Exercises: Concatenate three strings and display the result

C# Sharp String: Exercise-36 with Solution

Write a C# Sharp program to concatenate three strings and display the result.

C# Sharp Exercises: Concatenate three strings and display the result

Sample Solution:-

C# Sharp Code:

using System;

public class Example36
{
   public static void Main()
   {
      String str1 = "Don't count your chickens, ";
      String str2 = "before the eggs, ";
      String str3 = "have hatched.";

      var str = String.Concat(str1, str2, str3);
      Console.WriteLine(str);
   }
}

Sample Output:

Don't count your chickens, before the eggs, have hatched

Flowchart :

Flowchart: C# Sharp Exercises - concatenate three strings and display the result

C# Sharp Code Editor:

Improve this sample solution and post your code through Disqus

Previous: Write a C# Sharp program to concatenate a list of variable parameters.
Next: Write a C# Sharp program to concatenate the array values of strings.

What is the difficulty level of this exercise?



New Content: Composer: Dependency manager for PHP, R Programming