Welcome programmers from all around the world, on today's tutorial (which is a little late since this is episode #5).... We will be learning how to write a message on CSharp (C#) console system and also offer the user an option to insert a text in the form of an input/output style.
The reason this tutorial is a little late, is because it should have gone hand in hand with my first C# tutorial of "Hello World." Other than that, you can get started with my YouTube tutorial to get a good and warm welcoming on how to do this.
This is a two part tutorial, so I shall be offering two types of sources codes for each.. Instead of both on one.
How to write a line,
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Coder_Revolt___CSharp_Intro_to_Console
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Hello World, I'm Coder Revolt");
- Console.ReadLine();
- }
- }
- }
How to offer an input and get an output,
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Coder_Revolt___CSharp_Intro_to_Console
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.Write("What is your age? :");
- Console.Write("Your age is: {0}", Console.ReadLine());
- Console.ReadLine();
- }
- }
- }
0 comments :
Post a Comment