Convert:


♣    It is a predefined class which is part of “System” base class library

ToInt32 :


♣    It is a predefined member method of “Convert” class, this method will convert the given value into “int” datatype then it will return that value as “int”, because this method return type is “int”.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace pro4
{
    class Program
    {
        static void Main(string[] args)
        {
            /* employee details  */
            Console.WriteLine("enter employee number");
            int eno = Convert.ToInt32(Console.ReadLine());
            Console.WriteLine("enter employee name");
            string ename = Console.ReadLine();
           
            Console.WriteLine("enter employee salary");
            int sal = Convert.ToInt32(Console.ReadLine());
           
            Console.WriteLine("Enumber  "+eno);
            Console.WriteLine("Ename    " + ename);
            Console.WriteLine("salary   " +sal);


            Console.ReadLine();
        }
    }
}


Output :


lg3