C# foreach command

Question posted in Computer Software on 08 2009
Rate question difficulty level 0 Votes
How can a c# class support a foreach statement?
 
 
1 Answer
 
The class should inherit from IEnumerable interface:


public class MyClass : IEnumerable
{
....
....
}


08/18/2009
 
 
Add an answer*
 
Your name
Email
 
Company: Bynet
Location: Israel
c# asp.net

add a question

arrow_blue


Now hiring!
---------------------------
---------------------------
---------------------------
Mercer 
---------------------------
---------------------------
---------------------------
---------------------------