What is difference between ienumerable and ienumerator in c#?



What is difference between ienumerable and ienumerator in c#?..

Answer / 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

More C Sharp Interview Questions

How many bytes is an int?

1 Answers  


What is primitive types in c#?

1 Answers  


What is a dll in c#?

1 Answers  


Explain the ways to deploy an assembly?

1 Answers  


Assembly Code. in Rejester AL. How do Contast Replece( or Change): Bit D3 With Bit D4 and Bit D2 With Bit D5 and Bit D1 With Bit D6 and Bit D0 With Bit D7 I am Not Know Very Well Write English.

1 Answers   IBM,


What is lazy in c#?

1 Answers  


What is sqlcommand in c#?

1 Answers  


What are the security issues if we send a query from the application?

1 Answers   Microsoft,


write a C# Program add two matrix ?

1 Answers   Wipro,


How to declare a property in a class?

1 Answers  


What is datatable in c#?

1 Answers  


If you want to convert a base type to a derived type, what type of conversion do you use?

1 Answers  


Categories