How to return a value for these 2 methods?
First method should return only name alone and second method should return whole list.
public class Employee
{
int id;
int salary;
string name;
string department;
List<Employee> emp = new List<Employee>()
{
// Create 5 Employee details
new Employee{ id = 101, name = "Sravan",
salary = 12000, department = "HR" },
new Employee{ id = 102, name = "deepu",
salary = 15000, department = "Development" },
new Employee{ id = 103, name = "manoja",
salary = 13000, department = "HR" },
new Employee{ id = 104, name = "Sathwik",
salary = 12000, department = "Designing" },
new Employee{ id = 105, name = "Saran",
salary = 15000, department = "Development" }
};
}
static void GetEmployeeName(int id)
{
}
static Employee GetEmployeeDetail(int id)
{
}
}