Pergunta de entrevista da empresa Nagarro

1. How IEnumerable differs from IEnumerator? 2. If we pass a class object to a function as an argument, then how will it get passed, Call by value or call by ref and why?

Resposta da entrevista

Sigiloso

3 de mar. de 2021

1. IEnumerable is an Interface having a single Method GetEnumerator() Which return the IEnumerator Interface. This is getting Used on Collections having read only Access using Foraech Statement. IEnumerator is an Interface having two Methods, Movenext() and Reset() with one Property Current.

4