Krishna Rajput Singh
What is the difference between System.console.WriteLine() and System.console.Write() function?example?
By Krishna Rajput Singh in .NET on Jul 16 2014
  • Ragni Kesarwani
    Sep, 2016 23

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

    • 2
  • Amit Swami
    Oct, 2017 14

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

    • 0
  • Ashish Srivastava
    Jul, 2016 8

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

    • 0
  • Pankaj  Kumar Choudhary
    Aug, 2015 29

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

    • 0
  • Rahul Prajapat
    May, 2015 27

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

    • 0
  • Lakshmi Priya
    Dec, 2014 1

    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

    • 0
  • Ashu Bahl
    Nov, 2014 19

    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

    • 0
  • Joginder Banger
    Nov, 2014 11

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

    • 0
  • istekhar ahmad
    Oct, 2014 20

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

    • 0
  • Krishna Rajput Singh
    Jul, 2014 16

    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();}} }

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS