Using C#: Part 1: Console Input and Output

C Sharp Basics:

Using C#

C# is a multi-paradigm programming language created by Microsoft as part of the .Net initiative in 2000. It has gone on to have its own standard and become part of everything from desktop applications to used extensively in game development.


Console Input and Output

To help with working on the console, C# has a named object, Console. This provides functionality to read and write data directly.

Console.Read*

To read from the console, the methods Read(), ReadKey(), and ReadLine() are provided. These return the next character, the next key press, or the next full line.

Console.Write*

To write data to the console, the methods Write() and WriteLine() can be used.

Play with the example on Repl.it!