How should you complete the relevant code?

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:

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:

Explanation:



Leave a Reply 4

Your email address will not be published. Required fields are marked *


abhilash

abhilash

:IEnumerable
public IEnumerator GetEnumerator()
return _loanCollection.GetEnumerator();

vivek

vivek

When we implement IEnumerable interface, it will look like this :

class A:IEnumerable
{

public IEnumerator GetEnumerator()
{
……
}
}

so Answer posted by abhilash is correct…

amreen

amreen

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

LS

LS

IEnumerable
IEnumerable GetEnumerator ()
return _loanCollection.GetEnumerator();