Swipe
SwipeSwipe
Swipe Apps

Paths

Motivation

Information

Output · Lesson 16 of 27

Console.Write()

A free lesson from Swipe Coding · C#, level 2 · updated October 2026

By the Swipe team, founded by Colin · how we make lessons

🤖
Write() is WriteLine()'s more low-key sibling — no automatic new line. 🔇

Besides Console.WriteLine(), there is also Console.Write(). It works almost the same way, but with one important difference: Write() does NOT move to a new line afterward.

Console.Write("Hello");
Console.Write("World");

// Output:
// HelloWorld
Both pieces of text end up right next to each other on the same line — no space and no line break in between.
🤖
The cursor just... stays put. That is the whole trick. 📍

That is the key difference from WriteLine(): after Write(), the cursor stays exactly where the text ends, and the next output is appended directly after it.

Console.Write("A");
Console.WriteLine("B");
Console.Write("C");

// Output:
// AB
// C
"A" is printed with no line break, so "B" lands right next to it. WriteLine() then breaks the line, so "C" starts fresh below.
Quick check

What does this code output?

Console.Write("X");
Console.WriteLine("Y");
Console.Write("Z");

Write() is handy when you want to build a single line of output from several separate calls. Just remember: you have to add any spaces yourself — Write() never adds one for you.

Console.Write("C# ");
Console.Write("is ");
Console.Write("fun!");

// Output:
// C# is fun!
The spaces are deliberately placed at the end of "C# " and "is " — otherwise the words would run together.
Fill in the blank

Console.Write() outputs text but does not add a ____ afterward.

True or false

After Console.Write("Hi"); the next output automatically begins on a new line.

Quick check

What is the main difference between Console.Write() and Console.WriteLine()?

Keep your streak going in Swipe Coding

Swipe through every level of C# on your iPhone — with XP, stars, streaks, a personal advisor and the full track beyond these free levels.

Get the Swipe apps →