Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IEnumerable in class

Status
Not open for further replies.

dinger2121

Programmer
Joined
Sep 11, 2007
Messages
439
Location
US
Hello,
I have a class that I am creating and I would like to inherit from IEnumerable so that I can use the foreach functionality on it.

Do I do the inheritance at the interface level, or at the implementation level?

Thanks for any thoughts.

carl
MCSD, MCTS:MOSS
 
private void MyClass : IEnumberable {}

An interface cannot have any implementation code, so you'll inhert at the implementation level.

Craig Berntson
MCSD, Visual FoxPro MVP,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top