List Info

Thread: Re: Method that returns List




Re: Method that returns List<BaseClass>
user name
2007-12-16 14:43:51
Thanks for that input. I'll be sure to try it out when I get
back into the office.

________________________________________
From: Discussion of advanced .NET topics.
[ADVANCED-DOTNETDISCUSS.DEVELOP.COM] On Behalf Of Marc
Brooks [idisposableGMAIL.COM]
Sent: Friday, December 14, 2007 5:11 PM
To: ADVANCED-DOTNETDISCUSS.DEVELOP.COM
Subject: Re: [ADVANCED-DOTNET] Method that returns
List<BaseClass>

> Anyways, we have a service contract for IReporting, and
a ReportManager implementation class.
>
> public IList<ReportType> GetReport(string
reportName, Criteria c);

Rather than exposing and requiring a base class, you should
REALLY
expose an interface for your contract.  That way nobody
_has_ to
inherit from the base class... and then the list can be
IList<IReportType> which would be much better.

Marc

--
"He uses statistics as a drunken man uses lamp-posts…
for support
rather than illumination." Andrew Lang

Marc C. Brooks
http://musingmarc.blog
spot.com

===================================
This list is hosted by DevelopMentor®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )