Hi,
I'm doing a short test for a job interview that I have. The code is C# and I am very new to this (2 days :S).
One of the questions is. Write method to get all IPeople - Write a method in the SchoolManager to get all IPeople (Teachers and Students) in the system. Your method should return an IEnumerable of IPeople. You can make use of the exisiting GetAllTeachers and GetAllStudents methods in the SchoolManager or the Teacers and Students properties on the Course.
In a previous question I created the interface (hopefully correctly)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace School.Code
{
public interface IPeople
{
string FirstName
{
get;
set;
}
string LastName
{
get;
set;
}
Int64 DepartmentId
{
get;
set;
}
DateTime DateOfBirth
{
get;
set;
}
}
}
And in my PartialClasses.cs I've added : IPeople to both the Teacher and Student Class.
I am now completely stuck as to how I create a GetAllIPeople ENumberable method.
Any help would be greatly appreciated.