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


Please Help Members By Posting Answers For Below Questions

What is an abstract class c#?

978


Which namespaces are necessary to create a localized application?

1151


How do you inherit a class into other class in c#?

1001


How to assign Null value to Var?

1073


Why can't we use a static class instead of singleton?

963


What is expression tree in c#?

1007