Quiz 1 - Sheet 1 Flashcards

1
Q

A generic class is built around whatever type or types you supply during instantiation.

A

T

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Generic classes, conversely, make coding a lot simpler.

A

T

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Define a generic class.

A

Is built around whatever type, or types, are supplied during instantiation, enabling you to strongly type an object with hardly any effort at all.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

You can test nullable types to determine whether they are null, just like you test reference types.

A

T

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What can have any value that an “int” variable can, plus the value “null”?

A

nullableInt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

With nullable type equivalents, there is no difference: The values contained in nullable types are implicitly converted to the required type and the appropriate operators are used.

A

T

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is one way to declare a nullable type variable?

A

Int?nullableInt;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the shorthand form for System.Nullable?

A

int?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the symbol used to declare a variable is of nullable type?

A

?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

It is a binary operator that enables you to supply an alternative value to use for expressions that might evaluate to “null”. It known as the null coalescing operator.

A

T

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

The ?? operator is a ternary operator that enables you to supply an alternative value to use for an expression.

A

F?

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

If OP1 = null and OP2 = false, what is the answer of OP1&OP2 and OP1 | OP2?

A

False and null

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the null coalescing operator?

A

A binary operator that enables you to supply an alternative value to use for expressions that might evaluate to null.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the symbol for the null coalescing operator?

A

??

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

List is a collection of T objects.

A

T

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

List is a generic list.

A

T

17
Q

What generic collection type holds a collection of type T objects?

A

List

18
Q

Why is System.Collections.Generic not included in the default namespace in Visual Studio?

A

It is?

19
Q

You can’t set a starting list of items for generic lists.

A

F

20
Q

How many classes do you have to implement in order to use the List functionality?

A

0

21
Q

What does the member “int count” do?

A

Property providing the number of items in the collection.

22
Q

Sorting a generic list is much the same as sorting any other list.

A

T

23
Q

Predicate is a delegate type for a method used for searching, with the following return type and parameters: bool method(T targetObject).

A

T

24
Q

How do you sort a List?

A

Comparison

25
Q

What is Comparison?

A

A delegate type for a method used for sorting.

26
Q

The Dictionary type enables you to define a collection of key-value pairs

A

T