Aleksey wrote:
> Hi, guys!
> I'm trying to write collection and in example to do this I observed
> ListViewItemCollection public methods and properties. I was impressed when I
> find that the methods definitions in ListViewItemCollection different from
> methods in interfaces it implements!!!
> For example:
> IList methods:
> int Add(object value);
> void Insert(int index, object value);
> ListViewItemCollection methods:
> public virtual ListViewItem Add(ListViewItem value);
> public ListViewItem Insert(int index, ListViewItem
> item);
>
> There is no method Add in ListViewItemCollection returns int!!!
ListViewItemCollection implements IList through explicit interface
implementation. You can get at its method int IList.Add(object) by
casting to an IList (although the docs suggest you shouldn't, for this
object).
"Explicit Interface Implementation (C# Programming Guide)"
<http://msdn2.microsoft.com/en-us/library/ms173157(VS.80).aspx>
--
Larry Lard
(E-Mail Removed)
The address is real, but unread - please reply to the group
For VB and C# questions - tell us which version