public IList GetClientsByListofID(IList ids) where T : IClient { IList clients = new List(); 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