print in console c# code example

Example 1: c# print

Console.Write("C# Programming");

Example 2: c# print to console

Console.WriteLine("This is C#");

Example 3: console.writeline c#

Console.WriteLine("Hello, World");

Example 4: c# print console

System.Diagnostics.Debug.WriteLine("This is text");

Example 5: c# how to print

Console.WriteLine(/*something like "hello"*/);
Console.Write(/*something like "hello"*/);

Example 6: print message in console c#

using System;

namespace ReadLine
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.Write("Enter your name: ");

            string name = Console.ReadLine();
            Console.WriteLine("Hello {0}", name);
        }
    }
}