string concatenation

We all know what is string, String is a datatype which is used to store collection of characters(Word or sentance). String Concatenation is the process of appending one string to the end of another string. We can append one string to another string using '+' symbol.

CODE

static void Main(string[] args) {
    string text1 = "CODERS";
    string text2 = "CAPSULE";
    //'+' present below will simply merge text1 and text2
    string finalText = text1 + text2;
    Console.WriteLine(finalText); //Output : CODERSCAPSULE

    int number = 25;
    string text = "age";
    string finalResult = number + text;
    Console.WriteLine(finalResult); //Output : 25age
}


(Click Here, For more exercises)