The following practical example is for Question number 1d as per the syllabus of asp.net of Mumbai university.

Explanation.

The following program takes 2 integer variable as an input from the user using Console.ReadLine() method. This method allows you to take user input. You need to remember that type of input you take , the same type you need to convert the Console.ReadLine() method. Over here we are taking one string and one integer variable for the imput

Flow of the Program

  1. First we declare the variable with datatypes int and string.
  2. Then we prompt the user to enter the integer variable and string value using the Console.ReadLine() method.
  3. If you see for integer input we have converted the Console.ReadLine() method as implicit conversion cannot be achieved over here.
  4. For string input we do not need to convert as Console.ReadLine() by default accepts string value.
  5. After taking the input we are printing the value of Integer and string using Console.WriteLine() Method.

 

PDF version of the Program.

 

asp.net practicals

 

 

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending

©2018 MYBSCIT.com. An initiative by some failures to make student scholars.

or

Log in with your credentials

Forgot your details?