Repost from csharp.general: Confused about System.Collections.IEnumerator


P

paul

Hi all,
(Hopefully someone can answer this!)

Is it true that in *all* interfaces, the body of the defined functions
is missing, creating a level of abstraction for the functions, such as:


interface IComparable
{
int CompareTo(object obj);



}


??

If so, how does the following code work?


public class DbElementEnumerator :
System.Collections.IEnumerator
{
private IEnumerator m_RootEleEnumerator;
// other members removed


void System.Collections.IEnumerator.Reset()
{
m_RootEleEnumerator.Reset();
if (m_RootEleEnumerator.MoveNext())
{
m_RootEle =
(DbElement)m_RootEleEnumerator.Current;
// etc. etc.


How can the call to Reset(), MoveNext() work if the interface is
abstract?


TIA


Paul
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top