Console Application

console application means that runs on console window are called as a console application .


Methods of Console Application :

In C# methods are used which is defined below .


Write ()-

this mtd is used to display output to the user .


WriteLine ()-

this message is used to display required message to the user on the output stream


Read()-

Read mtd reads the single character and convert that character into the ASCII value


ReadLine()-

This will read an input stream from the console window and return the input string when user presses the Enter Key .


Clear()

this mtd is used to delete the content of screen and is same as clrscr().


System()

It is a base class Library.


Console-

Console is a predefined class which is a part of system base class Library.


Console .ReadLine()-

ReadLine is predefined member of console class.This method will accept input from the user,until user will press an enter key ,once user will press the enter key that accept value this method will written as string value because ReadLine() return types is string.


Convert.Tont32-


  • Convert is a predefined class which is a part of system base class Library.
  • ToInt32 is a predefined member mtd of convert class.
  • This method will convert given value in to int data type.

  • Using notepad write a simple program in C#


    using System;
    // this is a namespace 
    class First              // class name {
    	static void Main()      // Entry Point {
    		Console .WriteLine (“this is my first notepad programme”);
    		//Printing Msg
    	}
    }
    
    

    Process for compile above programe :

    Click on start button -> All Programs -> Visual Studio-> Visual Studio tools ->Developer Command Prompt for VS2012.


    Quantitative Aptitude
    Reasoning
    Programming
    Interview