4 Replies - 301 Views - Last Post: 07 March 2011 - 02:52 AM Rate Topic: -----

#1 tsotne1990  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 230
  • Joined: 01-November 10

IEnumerator interface

Posted 07 March 2011 - 02:31 AM

Hello! I have a question. I cannot derive from a IEnumerator interface. When I write - class someClass : IEnumerator. It has only the option IEnumerator<>. Which I don't need. I have to iterate over the someClass's subobjects using the foreach keyword.

Thanks
Is This A Good Question/Topic? 0
  • +

Replies To: IEnumerator interface

#2 CodingSup3rnatur@l-360  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 991
  • View blog
  • Posts: 971
  • Joined: 30-September 10

Re: IEnumerator interface

Posted 07 March 2011 - 02:40 AM

Hi,

You just need to add this using statement to your code:

using System.Collections;


Was This Post Helpful? 1
  • +
  • -

#3 tsotne1990  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 230
  • Joined: 01-November 10

Re: IEnumerator interface

Posted 07 March 2011 - 02:44 AM

It has been added. But I don't have a IEnumerator or IEnumerable interfaces. I have IEnumerable<> and IEnumerator<>

Thank you
Was This Post Helpful? 0
  • +
  • -

#4 tsotne1990  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 230
  • Joined: 01-November 10

Re: IEnumerator interface

Posted 07 March 2011 - 02:50 AM

I did it thanks
Was This Post Helpful? 0
  • +
  • -

#5 CodingSup3rnatur@l-360  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 991
  • View blog
  • Posts: 971
  • Joined: 30-September 10

Re: IEnumerator interface

Posted 07 March 2011 - 02:52 AM

Really? If you have that using statement, you should have access to them...

EDIT: Glad you got it working

This post has been edited by CodingSup3rnatur@l-360: 07 March 2011 - 06:25 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1