Language
Version: 5
Categories
-
User Program Communication
-
Variables
-
Control Flow
-
Object Oriented Programming
-
Strings
User Program Communication
Write to Console in C#
Used to output text to the console, using the IO namespace.
Syntax
Console.WriteLine("Put your text here!" + dataVariable);
Notes
The plus sign acts as a concatenator, joining together multiple items like strings and variables.
All non-string variables will be converted to string automatically.
Example
string name = "Hans";
Console.WriteLine("Hello, " + name + "!");