47 lines
628 B
Markdown
47 lines
628 B
Markdown
# Output
|
|
|
|
## Console.Write
|
|
|
|
to output a message in the console you can run the method
|
|
using a string literal
|
|
|
|
```C#
|
|
Console.WriteLine("Hello");
|
|
```
|
|
|
|
## Console.Write
|
|
The same but doesn't add a line at the end of the sentece
|
|
|
|
```C#
|
|
Console.Write("Hello");
|
|
Console.Write("You");
|
|
|
|
// Output
|
|
// HelloYou
|
|
```
|
|
|
|
## Comments
|
|
|
|
```C#
|
|
///This is a comment
|
|
|
|
/* this is a
|
|
* multiline command
|
|
*/ comment
|
|
```
|
|
|
|
## Escape Sequence
|
|
|
|
```C#
|
|
// tab
|
|
Console.WriteLine("\tHello")
|
|
// backspace
|
|
Console.WriteLine("Hello\bWorld")
|
|
// newLine
|
|
Console.WriteLine("Hello\nWorld")
|
|
```
|
|
|
|
## Console.ReadKey();
|
|
|
|
Prevent our program to end until we type a key
|