Ch. 9 Flashcards
(20 cards)
Which of the following statements about LINQ is false?
A new LINQ query must be used when changes are made to the data source.
A LINQ query does not need to have a let clause
A LINQ query returns an IEnumerable object
LINQ stands for Language Integrated Query.
A new LINQ query must be used when changes are made to the data source.
A generic method does not need an object of the class in order to execute.
True.
False.
False
The .NET collection classes provide flexible, efficient alternatives to arrays.
True.
False.
True
The international standard for querying relational databases is called:
XML
SQL
HTTP
LINQ
SQL
You can sort a LINQ query’s results only by one property.
True.
False.
False
Elements can be added at any location within an array after it’s created.
True.
False.
False
A List<T> can automatically resize itself to accommodate additional elements.
True.
False.</T>
True
The ________ extension method is typically used to determine whether a LINQ query’s results are non-empty.
Any
First
Count
None of the above
Any
A LINQ query is executed when it’s created.
True.
False.
False
You can sort a LINQ query’s results only by one property.
True.
False.
False
The Capacity property indicates the number of elements stored in the List<T>.
True.
False.</T>
False
Collections of type List<T> can hold objects of what type?
only other lists
only integers
objects of any one type
None of the above</T>
objects of any one type
Unlike arrays, lists do not resize automatically.
True.
False.
False
The results of a LINQ query can have only the same type as the data being queried-for example, a LINQ query on a collection of Employee objects will always have Employee objects in the results.
True.
False.
False
The range variable is implicitly defined in the _____ clause and used to produce results in the ______ clause
where, put
from, put
from, select
where, select
in, foreach
from, select
The ________ extension method is returns the number of results in a LINQ query.
Any
First
Count
None of the above
Count
You can sort a LINQ query’s results only by one property.
True.
False.
False
The objects returned when using multiple properties in a select clause are objects of an anonymous type.
True.
False.
True
LINQ is used to query collections in the same way it’s used to query arrays.
True.
False.
True
A let clause is used to create _______.
a method within a LINQ query
a subquery
a new range variable
None of the above
a new range variable