add getenumerator to class c#

C#
public bool MoveNext()
{
      position++;         
      return (position < carlist.Length);      
}      
public void Reset() => position = 0;
public object Current {         
       get { return carlist[position];}      
}
Source

Also in C#: