Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

public class mploye

{
public int emp id;
public string empname;
pubic string empdepartment;
pubic string empdestination;
public double emppay;
public employee()
{
empid=0;
empname="";
empdestination="";
empdepartment="";
emppay=0;
}
public employe(int i,string n,string d,string de,double p)
{
empid=i;
empname=n;
empdestination=d;
empdepartment=de;
emppay=p;
}
}
class program
{
static void main(string[] args)
{
list<employee> emplist=new list <employee>()
{
new employee()
{empid=100,epname="ahsan",empdepartment="FC",empdestination="TF",emppay=50000},
new employee() {empid=101,epname="sakht
londa",empdepartment="FC",empdestination="jl",emppay=5000},
new employee() {empid=102,epname="acha
bacha",empdepartment="Feas",empdestination="PTI",emppay=50002222},
new employee() {empid=103,epname="hamad",empdepartment="FC",empdestination="girja
road",emppay=589},
new employee()
{empid=104,epname="NEPAL",empdepartment="MBBS",empdestination="rangeroad",emppay=50
099},
};
var record = from s in emplist
select s;
foreach(var data in record)
{
console.writeline("name:"+data.empname+"\id:"+data.empid+"\department:" +
data.empdepartment);
console.writelin("destination:"+data.empdestination+"\tpay:"+data.emppay);
console.writeline("");
console.writeline("\t\t\t-------------------------");
}
}
}

You might also like