On 12/14/07, Ron Young <[EMAIL PROTECTED]> wrote: > Is the following possible? The compiler tells me no: > > public List<Report> GetReports() > { > List<ReportA> reports = new List<ReportA>(); > reports.Add(new Report()); > return reports; > }
Covariance is not supported for generics in C#, though I think the underlying CLR does actually allow it. -- Curt Hagenlocher [EMAIL PROTECTED] =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com