1. Which object does the variable mySet inherit from? Int[] mySet = new int[5]; a.System.Collection b.System.Collection.List c.System.Array...

Question:

1. Which object does the variable mySet inherit from?
Int[] mySet = new int[5];
a.System.Collection
b.System.Collection.List
c.System.Array
d.None, this is a value type.
2. Which type should you use to store objects of different types but do not know how many elements you need at the time of creation?
a.Collection
b.List
c.Stack
d.ArrayList
3. If you create a custom class that is going to be used as elements in a List object and you want to use the Sort method of the List object to sort the elements in the array, what steps must you take when coding the custom class?
a.Inherit from the ICompare interface. Implement the Comparable method.
b.Inherit from the IComparable interface. Implement the CompareTo method.
c.Inherit from the System.Array class. Override the Sort method.
d.Inherit from the List class. Implement the Sort method.
4. Which collection would you use if you need to process the items in the collection on first-in-first-out order?
a.HashTable
b.Queue
c.Stack
d.List
5. Which collection would you use if you need to process the items in the collection on a last-in-first-out order?
a.HashTable
b.Queue
c.Stack
d.List
6. Which collection would you use if you need to quickly find an element by its key rather than its index?
a.Dictionary
b.List
c.SortedList
d.Queue
7. Which ADO.NET object is used to connect to a database?
a.Database
b.Connection
c.Command
d.DataAdapter
8. Which properties of an ADO.NET Command object must you set to execute a stored procedure?
a.CommandTypeStoredProcedureNameParameters
b.IsStoredProcedureCommandTypeStoredProcedureNameParameters
c.CommandTypeCommandTextParameters
d.IsStoredProcedureCommandTextParameters
9. Which Command object's method would you use to execute a query that does not return any results?
a.ExecuteNonQuery
b.ExecuteDataReader
c.ExecuteScalar
d.Execute
10. Which Command object's method would you use to execute a query that returns only one row and one column?
a.ExecuteNonQuery
b.ExecuteDataReader
c.ExecuteScalar
d.Execute
Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  answer-question

Physics

ISBN: 978-1118486894

10th edition

Authors: David Young, Shane Stadler

Question Posted: