• Business
  • Finance
  • Banking
  • Education
  • General
  • Law
  • Science
  • IT
  • English

Key Differences

Know the Differences & Comparisons

Difference Between Write and WriteLine

Last updated on June 8, 2019 by Surbhi S

write vs writelineWrite Method

Write method resides inside the ‘Console’ class which itself resides inside the System namespace. The Console class provides basic support for applications that read and write characters to and from the console. The write() method outputs one or more values on the screen without a new line character. This means any subsequent output will be printed in the same line.

Example of Write() in C#
writeOutput:
Car Bus Truck

WriteLine Method

The WriteLine method also resides inside the ‘Console’ class of the System namespace. The WriteLine method prints one or more object on a single line with a new line character inserted at the end. This means any subsequent output will be printed on a new line.

Example of WriteLine() in C#
writelineOutput:
Car
Bus
Truck

Difference Between Write and WriteLine

The Write method is used to print one or more objects on a single line without inserting a new line character at the end. The WriteLine method inserts a new line character after printing the output. In the Write method, the cursor remains at the same line, while in WriteLine it moves to the next.

Related Differences

  • Difference Between Passport and Visa
  • Difference Between Life Insurance and Health Insurance
  • Difference Between Public Sector and Private Sector
  • Difference Between Sales and Marketing
  • Difference Between Scholarship and Fellowship

You Might Also Like:

abstract class vs interfaceDifference Between Abstract class and Interface in C# Difference Between Interface and Class ref vs out parameterDifference Between ref and out parameter in c# array vs arraylistDifference Between Array and ArrayList in C# personality vs characterDifference Between Personality and Character InflationDifference Between Demand-Pull and Cost-Push Inflation

Comments

  1. Jayesh says

    December 30, 2016 at 3:49 pm

    Its really clear to understand the article you write
    Thanks

    Reply
  2. Shafiul Azam says

    February 21, 2018 at 10:11 am

    All your writing is so clear and easy to read. Thanks a lot indeed.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Top 5 Differences

  • Difference Between PERT and CPM
  • Difference Between Micro and Macro Economics
  • Difference Between Developed Countries and Developing Countries
  • Difference Between Management and Administration
  • Difference Between Qualitative and Quantitative Research

Related Differences

  • Difference Between Passport and Visa
  • Difference Between Life Insurance and Health Insurance
  • Difference Between Public Sector and Private Sector
  • Difference Between Sales and Marketing
  • Difference Between Scholarship and Fellowship



New Additions

  • Difference Between Speak and Talk
  • Difference Between Economy Class and Business Class
  • Difference Between If and Whether
  • Difference Between Hotel and Motel
  • Difference Between FIR and Chargesheet
  • Difference Between Norms and Values
  • Difference Between Society and Community
  • Difference Between Sourcing and Procurement
  • Difference Between National Income and Per Capita Income
  • Difference Between Departmental Store and Multiple Shops
fb-follow youtube follow

Copyright © 2023 · Key Differences · Contact Us · About Us · Privacy