' < IENUMERABLE (T) > ' Interface in C#
Why we required < IEnumerable (T)> interface in C#.
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
TulasiRank #2,544 · 549 reputationPosted Oct 20, 2011, 8:14 PM EDT
Enumerators are used to read the data in the collection but however they cannot be used to modify the underlying collection.
Almost all pre-defined collections (like HashTable, Dictionary...) in .NET support the For Each loop structure. They do this, because these class have implemented an interface called IEnumerable. If you are developing ur own customized collection and you want this collection class to work with the for each loop, your class must implement the IEnumerable interface. IEnumerator is the base interface for all nongeneric enumerators.http://msdn.microsoft.com/en-us/library/system.collections.ienumerator.aspx
Please mark the answer as Accepted if it helps you.
Prabhu RajaRank #861 · 2.6K reputationPosted Oct 21, 2011, 1:53 AM EDT
Hope this Article Will be Useful for you. Click Here
Vipul KelkarRank #1,061 · 1.8K reputationPosted Oct 21, 2011, 2:11 AM EDT