Appendix C. Pop Quiz Answers

Chapter 2

Lists

1

numbers.Find(1), 3

2

3

3

{2}

4

{d}

5

{a,b,c,d,e}

Chapter 3

Dictionaries

1

a

2

b

3

stockPrices["MSFT"]["June2011"]

Chapter 4

LINQ to Objects

1

  • Where(x=>x%2==0 && x<10)

  • Where(x=>x<10)

However remember that many where clauses can result in the same query as with if-statements.

2

c

3

a (It will throw an exception as there is no such element present in the collection)

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.252.37