Introducing Radical.sh

Forget Code launches a powerful code generator for building API's

Concatenating strings in C#

Two separate strings can be concatenated to form a single string using '+' operator.

The example illustrates the same:

  1. using System;
  2. using System.IO;
  3.  
  4. namespace forgetCode
  5. {
  6. class program1
  7. {
  8. static void Main(string[] args)
  9. {
  10. string name1 = "Forget";
  11. string name2 = "code";
  12.  
  13. string fullName = name1 + name2;
  14.  
  15. Console.WriteLine(fullName);
  16.  
  17. }
  18. }
  19. }


Output:
ForgetCode

..