Hi all,
public IList<T> GetClientsByListofID<T>(IList<int> ids) where T : IClient
{
IList<T> clients = new List<T>();
clients.Add( new Client(3));
}
I am getting a compiler error here:
cannot convert from 'Bailey.Objects.Client' to 'T'
The client object implements the IClient interface. My goal here is to try and loosen the coupling between my classes (learning DI stuff atm). I was thinking that I can say it can use any type of client object and that would be returned.
Am I completely off base here?
Thanks
Jon Hawkins