adspace
What is difference between ienumerable and ienumerator in c#?
Answer Posted / Km Neelam Saini
IEnumerable<T> is an interface in C# that defines a read-only collection of items, while IEnumerator<T> is an interface for defining methods to access the elements in a sequence one by one. IEnumerable<T> provides the GetEnumerator() method that returns an IEnumerator object, which can be used to iterate through the elements of the collection.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers