Core C#

Numbers and Concatenation

This C# program demonstrates how print numbers and join them to text via concatenation, using the + operator.

Program.cs

using System;

namespace XoaX {
    class Program {
        static void Main(string[] args) {
            Console.WriteLine("Genesis 2");
            Console.WriteLine(24 + " Therefore a man leaves his father and his mother ");
            Console.Write("and cleaves to his wife, ");
            Console.WriteLine("and they become one flesh. ");
        }
    }
}
 

Output

Genesis 2
24 Therefore a man leaves his father and his mother
and cleaves to his wife, and they become one flesh.
Press any key to continue . . .
 
 

© 2007–2024 XoaX.net LLC. All rights reserved.