Convert:
ToInt32 :
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();
}
}
}
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();
}
}
}