printing with WriteLine and Write - CSharp Language Basics

CSharp examples for Language Basics:Console

Description

printing with WriteLine and Write

Demo Code




class display/*w  w w  .  jav  a 2 s.  c o m*/
{
    public static void Main()
    {
        System.Console.WriteLine("First WriteLine Line");
        System.Console.WriteLine("Second WriteLine Line");

        System.Console.Write("First Write Line");
        System.Console.Write("Second Write Line");

        // Passing parameters
        System.Console.WriteLine("\nWriteLine: Parameter = {0}", 123 );

        System.Console.Write("Write: Parameter = {0}", 456);
    }
}

Result


Related Tutorials