using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ListReference
{
class Program
{
static void Main(string[] args)
{
List<Employee> EmployeeList = new List<Employee>();
EmployeeList.Add(new Employee("Iqbal Hossain", "08159965875", "Noakhali", 25000));
EmployeeList.Add(new Employee("Zabed Hossain", "08159955875", "Dhaka", 50000));
EmployeeList.Add(new Employee("Samsul Hossain", "08159565875", "Chittagong",22000));
EmployeeList.Add(new Employee("Rahim Akhter", "08159965845", "Rajshai",16000));
EmployeeList.Add(new Employee("Roman Hossain", "08159965812", "Rajshai",22000));
EmployeeList.Add(new Employee("Jamal Hossain", "08159965865", "Chandpur",23000));
EmployeeList.Add(new Employee("Prince Hossain", "0815976875", "Noakhali",50000));
Console.WriteLine("Employee List ");
Console.WriteLine("-----------------------------------");
foreach (var employee in EmployeeList)
{
Console.WriteLine("Employee List : {0}, {1}, {2}, {3}", employee.EmployeeName, employee.EmployeePhone, employee.EmployeeAddress,employee.EmployeeSalery);
}
Console.WriteLine("\n-----------------------------------");
Console.WriteLine("Count Eemployee ");
Console.WriteLine("-----------------------------------");
Console.WriteLine("\n There are: {0}, {1}", EmployeeList.Count,"Employees available ");
Console.WriteLine("\n-----------------------------------");
Console.ReadLine();
}
}
public class Employee
{
private string employeeName;
private string employeePhone;
private string employeeAddress;
private double employeeSalery;
public Employee(string employeeName, string employeePhone, string employeeAddress, double employeeSalery)
{
this.employeeName = employeeName;
this.employeePhone = employeePhone;
this.employeeAddress = employeeAddress;
this.employeeSalery = employeeSalery;
}
public string EmployeeName
{
get { return employeeName; }
set { employeeName = value; }
}
public string EmployeePhone
{
get { return employeePhone; }
set { employeePhone = value; }
}
public string EmployeeAddress
{
get { return employeeAddress; }
set { employeeAddress = value; }
}
public double EmployeeSalery
{
get { return employeeSalery; }
set { employeeSalery = value; }
}
}
}