Sunday 8 December 2019

C# Session 2: Input and Output Handling in C#


Input and Output Handling

Reading From Console:
To read the user input from console window we are having Console.ReadLine() method.

Writing From Console:
To read the user input from console window we are having Console.WriteLine() method.

Here we are discussing 3 ways to write into console.

  • Using Concatenation
  • Using Placeholder
  • Using Interpolation


Hello World Program:



The Using statement we are using to include a namespace to program. Like Console class is from System namespace and if we won’t be using then we need to go for fully qualified namespace.

Namespace is a collection of classes, interfaces etc… and Main()  is the entry point to a program.

No comments:

Post a Comment

Angular 8 Session 21 - ngFor Directive In Angular

ngFor Directive Content will be resume soon. Stay tuned!