I am relatively new to OO programming and exploring advanced concepts and best practices such as using Interfaces to encapsulate the data layer of applications.
It is recommended by one guru in a Webcast that we use the Ilist interface to send the data back from the DAL to the UI. He mentions that the IList only allows 2 things to be done with it:
1. Bind it to a Data Access Control (Datagrid, Repeater etc) and
2. Loop thru it with For Each for example.
How would I know this? If I look at the Help files, this is not obvious.
Please let me know if there is a better Forum to ask these types of questions as I will have many more in the next few weeks.
-CyberQ4Not quite right. From the IList interface overview:
IList is a descendant of the ICollection interface and is the base interface of all lists. IList implementations fall into three categories: read-only, fixed-size, variable-size. A read-only IList cannot be modified. A fixed-size IList does not allow the addition or removal of elements, but it allows the modification of existing elements. A variable-size IList allows the addition, removal and modification of elements.
Check out the docs:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemcollectionsilistclasstopic.asp
0 comments:
Post a Comment