You are developing a custom collection named LoanCollection for a class named Loan class.
You need to ensure that you can process each Loan object in the LoanCollection collection by using a
foreach loop.
(You may need to drag the split bar between panes or scroll to view content.))
How should you complete the relevant code? (To answer, drag the appropriate code segments to the
correct locations in the answer area. Each code segment may be used once, more than once, or not at all.
Select and Place:
Answer:
:IEnumerable
public IEnumerator GetEnumerator()
return _loanCollection.GetEnumerator();
When we implement IEnumerable interface, it will look like this :
class A:IEnumerable
{
public IEnumerator GetEnumerator()
{
……
}
}
so Answer posted by abhilash is correct…
hi could you please go on the request page comment for admin to say update microsoft 70-178 questin and answers. plz could you do this as it seems to not letting me log in to comment thanks would appreciate it
IEnumerable
IEnumerable GetEnumerator ()
return _loanCollection.GetEnumerator();