Now you know what you need to know to get started in c# programming. Let's continue our journey😍
Getting output/Print Values
"Console.WriteLine()" method
The "Console.WriteLine()" method is used to write text to the console, and you can use it to output anything from simple messages to complex data.
Check the same example below which we took in the previous post as well(C-1-1):
(C-1-1) |
- You can add any number of Console.WriteLine() methods as you want in your program and you can output anything such as numbers, and words.
- It will start in a new line each time(C-1-2).
(C-1-3) |
ACTIVITY:
If you know describe each line of code we used in the above examples. Post your answer in the comments section below.
Congratulations! Now you have an understanding of getting output using WriteLine() and Write() methods. Let's get to know each and every code line which you saw in this and previous examples in the next post.
Post a Comment