IBindingList-- Why is explicit interface implementation required?

  • Thread starter Thread starter Dave Veeneman
  • Start date Start date
D

Dave Veeneman

I'm working my way through the IBindingList interface, and I am puzzled by
something: Theexample in the IBindingList Overview (.NET Framework
documentation) uses explicit implementation for each of the IBindingList
elements implemented in the collection class.

For example, the implementation of the IBindingList AddNew method is
declared as an explicit implementation:

object IBindingList.AddNew() {...}

instead of more simply as an implicit implementation:

object AddNew() {...}

I tried changing the example's AddNew implementation from the first form to
the second form, and the compiler threw an exception because the collection
class no longer implemented the IBindingList AddNew method. So, obviously,
explicit declarations are required.

My question is, why? I can't find anything in the IBindingList documentation
explaining why explicit implementation is required. Thanks in advance.
 
Found my answer-- The implementation of IBindingList doesn't have to be
explicit-- that's just the way they did it in the example. (I was getting
the compiler error for another reason).
 
Back
Top