how do i implement this?

o tryed the following:

top
PHP Code:
    public class devTab TabPageSystem.Collections.IEnumerator 
code
PHP Code:
        private int _enumerator 0;

        public 
bool MoveNext()
        {
            if (
this.Items.Count == _enumerator)
            {
                return 
false;
            }
            else
            {
                
_enumerator++;
                return 
true;
            }
        }

        public 
void Reset()
        {
            
_enumerator 0;
        }

        public 
object Current
        
{
            
get
            
{
                return 
this.Items[_enumerator];
            }
        } 
(this has more code but it doesnt matter here i think)

but it keeps saying that i cannot make a foreach statement because the class doesnt implement the getenumerator