using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
String readme; // Declaring a String variable to be used by ReadLine method.
int CharNumber; // Declaring an Integer called CharNumber
Console.Write("This line will Print the output to Screen and will not move to next line");
Console.Write("This will be printed in the same line\n");
Console.WriteLine("This Line gets printed and moves to the next Line");
Console.Write("This will get printed and moves to next Line as we are using escape charachters \n");
Console.WriteLine("Please enter the data to use ReadLine method ");
readme = Console.ReadLine();
Console.WriteLine("You entered-{0}", readme);
int i = 0; //declaring integer i to be 0
//Using Console.Read Method - Reads Characters from Console. It returns as as integer untill Zero is reached.
Console.WriteLine("Please Enter The String to use Console.Read");
while ((CharNumber = Console.Read()) != 0)
{
i++; //incrementing integer
Console.WriteLine("Value for Char Number {0} = {1} " + "And Charachter Number is {2}", CharNumber, (char)CharNumber, i);
// This line will print the local integer Char Number = Charachter Value for Charachter Sequence (i)
}
Console.ReadKey(); //Waits for an key to be entered by the user at the console for program to exit
}
}
}Starting off with Basics of C -Beginners Tutorial 1
