C# Console Methods

Beginner
6 min read
Updated: Nov 2026
19 method guides
Method index

About This Index

This page is the C# Console Methods index. Each row links to a full guide with syntax, parameters, return value, three examples, and FAQs.

Learn what Console is for on /c-sharp/console. Use this page when you need a specific API such as WriteLine(), ReadLine(), or Clear().

stdin and stdout.

Keyboard input usually arrives through standard input. Text you print with Write/WriteLine goes to standard output. Cursor and window helpers need a real console window and may throw when output is redirected.

How to Call a Console Method

All of these helpers are static on Console:

C#
Console.Write("Name: ");
string? name = Console.ReadLine();
Console.WriteLine("Hi, " + name);
Console.Clear();

C# Console Methods Table

All method guides in this C# tutorial series (19 tutorials), grouped by purpose.

Writing

2 methods

Print text to the console—with or without a trailing newline.

MethodDescriptionTutorial
Write()Print text to the console without adding a new line at the end.Try it
WriteLine()Print text (or an empty line) and move to the next line.Try it

Reading

3 methods

Read characters, full lines, or a single key press from input.

MethodDescriptionTutorial
Read()Read the next character from input as an int, or -1 at end of file.Try it
ReadLine()Read a full line of text from the console, or null at end of file.Try it
ReadKey()Read a single key press; optionally hide it with intercept.Try it

Screen / cursor

8 methods

Clear the screen, beep, reset colors, and manage cursor, buffer, and window.

MethodDescriptionTutorial
Clear()Clear the console screen buffer and reset the cursor to the home position.Try it
Beep()Play a console beep; optional frequency and duration on supported platforms.Try it
ResetColor()Restore foreground and background console colors to their defaults.Try it
GetCursorPosition()Return the current cursor left/top as a tuple (.NET 5+).Try it
SetCursorPosition()Move the console cursor to a column (left) and row (top).Try it
SetBufferSize()Change the width and height of the console screen buffer.Try it
SetWindowSize()Change the visible console window width and height.Try it
SetWindowPosition()Move which part of the buffer is visible (window origin).Try it

Streams / redirect

6 methods

Redirect In/Out/Error, or open the raw standard streams as Stream objects.

MethodDescriptionTutorial
SetIn()Redirect Console standard input to a different TextReader.Try it
SetOut()Redirect Console standard output to a different TextWriter.Try it
SetError()Redirect Console standard error to a different TextWriter.Try it
OpenStandardInput()Return the raw standard input Stream (optionally with a buffer size).Try it
OpenStandardOutput()Return the raw standard output Stream (optionally buffered).Try it
OpenStandardError()Return the raw standard error Stream (optionally buffered).Try it

Frequently Asked Questions

They are helpers on System.Console for writing text (Write, WriteLine), reading input (Read, ReadLine, ReadKey), controlling the screen and cursor, and redirecting the standard streams.
This index lists 19 guides: writing, reading, screen/cursor helpers, and stream redirect APIs.
Write prints without a newline so the next text continues on the same line. WriteLine prints and then moves to the next line (or prints only a blank line).
null. An empty Enter key returns an empty string (""), which is different. Read returns -1 at EOF instead.
Read the C# Console hub first. Then open WriteLine(), ReadLine(), Write(), and Clear() from the tables below.

Start with WriteLine()

Print a line of text—the first Console method most beginners learn.

WriteLine() tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

12 people found this page helpful