10
Reply

What is the difference between System.console.WriteLine() and System.console.Write() function?example?

Krishna Rajput Singh

Krishna Rajput Singh

Jul 16, 2014
22.5k
1

    writeline () makes ur control move to the next line wereas write() makes ur control to stay on the sameline

    Ragni Kesarwani
    September 23, 2016
    2

    console.writeLine() , after print of statment, this function carry next statement to next line: while console.write() only print statement

    Amit Swami
    October 14, 2017
    0

    writeline () makes ur control move to the next line wereas write() makes ur control to stay on the sameline

    Ashish Srivastava
    July 08, 2016
    0

    writeline () makes ur control move to the next line wereas write() makes ur control to stay on the sameline

    Pankaj Kumar Choudhary
    August 29, 2015
    0

    consol.WriteLine() change the line after print the given text but consol.Write() do not change line.

    Rahul Prajapat
    May 27, 2015
    0

    system.console.writeline() and System.console.Write() both are used as output statements in c# but th basic difference is writeline () makes ur control move to the next line wereas write() makes ur control to stay on the sameline

    Lakshmi Priya
    December 01, 2014
    0

    Console.Writeputs text on the console window. Getting started with the Console can be confusing. We learn the difference between Console.Write and Console.WriteLine. We decide which one to choose. We even use them together.ExampleThe Console.Write method requires the System namespace to be included at the top to get the fully qualified name. The Write method does not append a newline to the end of the Console.Also, if you are printing a string that already has a newline, you can use Console.Write for an entire line. And when you call WriteLine with no parameters, it only writes a newline.using System;class Program {static void Main(){Console.Write("One "); // <-- This writes the word.Console.Write("Two "); // <-- This is on the same line.Console.Write("Three"); // <-- Also on the same line.Console.WriteLine(); // <-- This writes a newline.Console.WriteLine("Four"); // <-- This is on the next line.} }Result is :--One Two Three Four

    Ashu Bahl
    November 19, 2014
    0

    i got only single difference between console.writeLine() break new line, no worry for new line. Console.Write worry about the new line

    Joginder Banger
    November 11, 2014
    0

    System.console.WriteLine() =break new line and System.console.Write() =not break new line

    istekhar ahmad
    October 20, 2014
    0

    Both the function enable you to print information on the screen in the same manner, but with a small difference of both.System.console.WriteLine()prints the information on screen and goes to next line .However, System.console.Write()print the information on the screen ,but does not go to next line.only one print the current line.Example: using System; using System.Collections.Generic; using System.Text;namespace ConsoleApplication4 {class Program{static void Main(string[] args){System.Console.WriteLine("Welcome to Console C#");System.Console.WriteLine("Difference between console");System.Console.Write("Hello C# Corner\t");System.Console.Write("How are you C# Corner");Console.ReadLine();}} }