CSharp - Write program to Compound Assignment and Text

Requirements

You will use Compound Assignment and Text to append text together.

Hint

The + operator can be used with text, you can use the compound assignment operator (+=) with text.

Demo

using System;
class Program{//from  w ww  .j  ava  2s  .c  om
    static void Main(string[] args)
    {
        // Initial value (empty text) 
        string books = "";

        // Appending 
        books += "this " + Environment.NewLine;
        books += "is" + Environment.NewLine;
        books += "a test" + Environment.NewLine;

        // Output 
        Console.WriteLine("Valuable books");
        Console.WriteLine(books);
    }
}

Result