Finals Flashcards

1
Q

Unlike reference types, nullable types are tested for null using the IComparable method.

A

F

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

If variable x is null and variable y is false, then x|y is false

A

F

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

The Dictionary type is used to define a collection of key-value paris.

A

T

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

What is a generic class?

A

It is built using whatever type or types are passed into it when it is instantiated.

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

Give a statement declaring the variable X to be a nullable integer type.

A

int?x;

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

What is the purpose of the null coalescing operator?

A

Supplies alternative values if expression is null.

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

What is the null coalescing operator?

A

”??”

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

Give a statement declaring the varialbe students to be a generic collection that holds a collection of objects of type Student.

A

List students;

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

C# is a typesafe language

A

T

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

Operators can be roughly classified into three categories: numary, binary, and turnary.

A

F

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

A delegate is a type that enables a program to store references to functions.

A

T

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

InC#, all classes derive from the base class Parent at the root of all classes.

A

F

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

When an object is assigned to a variable, the variable actually receives a pointer to the object.

A

T

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

Protected class members are accessible only from code that is part of the class or from a class derived from it.

A

T

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

Fields, methods, and properties can also be declared using the keyword ‘global’ which means the are static members owned by the class.

A

F

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

Automatic properties must include both a Get and Set accessor.

A

T

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

Class definitikons can be split across multiple code fiels using the ‘partial’ keyword.

A

T

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

A class that implements an interface must implement all of the members defined by the interface as public.

A

T

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

Arrays in C# are implemented as instances of the ‘System.Array class and are just one type of what are known as colleciton classes.

A

T

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

Custom collection classes can be strongly typed.

A

T

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

The ‘GetIEnumerator’ mehtod allows iterating over a class.

A

F

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

An iterator is a block of code that supplies all the values used in a foreach block.

A

T

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

The ‘is’ operator can be used in a program to check whether an object either is or can be converted into a given type.

A

T

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

What is the term for the .net method of freeing up unused memory?

A

Garbage colleciton.

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

What are the loop statements in C#.

A

do while, do, for

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

What is the difference between implicit and explicit conversions?

A

Implicit conversions are done by the compiler automatically. Explicit conversions are done by the programmer.

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

What is a struct?

A

A struct is a data structure that is compiled of data members, which can be of different types.

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

By definitions, const members have what accessibility level?

A

Static

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

Why are properties the preferred way to access the state of an object?

A

To protect external code from implementation details.

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

What is the keyword ‘this’ used for in C#?

A

it refers to the current instance of an object.

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

Why would a programmer use the ‘new’ keyword in defining interface members.

A

To hide the parent interface members.

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

What are indexers?

A

Special properties that provide array-like access.

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

The ‘IEnumerable’ interface enables a program to use what kind of loop?

A

If

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

What are two types of comparisons between objects?

A

Value and Type

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

What is boxing?

A

Changing the type an object is into a System.Object type, or an Interface type.

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

What does operator overloading enable a progrmmer to do?

A

Manipulate the way an operator behave.

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

What is the function of the ‘as’ operator.

A

converts a type into a specified reference type.

38
Q

Only ‘T’ can be used as the parameter when creating generic classes.

A

F

39
Q

Generic classes cannot be inherited from.

A

F

40
Q

When an interface inherits from a generic interface, it must keep the constraints of the base interface generic type parameters.

A

T

41
Q

Defining a generic delegate simply requires using one or more generic type parameters

A

T

42
Q

Subscribing to an event means supplying code that will be executed when an event is raised.

A

T

43
Q

Event handlers are methods.

A

T

44
Q

There is an equivalent to the try…catch structure for handling events.

A

F

45
Q

Instead of defining event handler methods, the programmer can choose to use anonymous methods.

A

T

46
Q

[StepBy] tells VS not to step into code during debugging.

A

F

47
Q

It is possible to create attributes by deriving from the System.Attribute class.

A

T

48
Q

What syntax signifies a generic class in C#?

A

using the angle brackets. EX: MyClass{}

49
Q

What constraint does ‘struct’ put on a generic type?

A

Struct constraints require the type to be of a value.

50
Q

What is a generic method?

A

A mehtod in which the return and or parameters are set based on the generic type.

51
Q

What are nullible types?

A

Nullible types are types that allow both the thype values and the null value.

52
Q

What does the ?? operator do?

A

Takes the value of the first operand, unless it is a null value; in which case it takes the value of the second operand.

53
Q

What does the :: operator do?

A

Another way to address the type in a namespace.

54
Q

What is the ‘object source’ as the term applies event handling?

A

A method without a name used as target for a delegate.

55
Q

What is ‘decorating’ ?

A

Adding attributes to code.

56
Q

What is ‘reflection’?

A

Way to get attributes information in a program.

57
Q

One of XAML’s shortfalls is its inability to render 3D graphics.

A

F

58
Q

A dependency property is registered with the WPF property system to allow extended functionality.

A

T

59
Q

Routed events are usually associated with non-user actions.

A

F

60
Q

A routed event can travel up and down the hierarchy of the control on which the event occurred.

A

T

61
Q

Routed commands, like events, can cause code to execute.

A

T

62
Q

The Panel class directory can be used for control layout.

A

F

63
Q

The canvas control provides complete freedom over control positioning.

A

T

64
Q

What is a code-behind file?

A

C# files that are dynamically linked to the XAML files.

65
Q

What does WYSIWYG?

A

What you see is what you get.

66
Q

Where does Visual Studio put the code-behind files?

A

Visual Studio puts code-behind files in the same directory as XAML files.

67
Q

What is the term for configuring sets of related properties so that they all update in response to a change to one of them?

A

Coercion.

68
Q

All content layout controls derive from which abstract class?

A

Panel class.

69
Q

What does ‘Margin’ refer to with regard to controls?

A

Space left bland around the edges of a control.

70
Q

A TextBox control by default wraps text.

A

F

71
Q

The normal operation for a groups of CheckBoxes is that when one of them is checked, any other that was checked is unchecked.

A

F

72
Q

By default pages are constructed of TabItems.

A

T

73
Q

Which control allows displaying and re-sizing a single image?

A

image control.

74
Q

How many different states can a CheckBox be in?

A

Three.

75
Q

Which control allows selecting multiple text items?

A

ListBox

76
Q

What base class do Triggers inherit from?

A

Trigger Base

77
Q

Most controls in >NET derive from the System.Windows.Forms.Control class.

A

T

78
Q

Double-Clicking a control will create the default event for the given control?

A

T

79
Q

Radio Buttons are used to play audio files?

A

F

80
Q

A CheckBox control traditionally displays itself as a label with a small box at its immediate left.

A

T

81
Q

The RadioButton control derives from CheckBox base.

A

F

82
Q

When a control is placed on a form, the form is said to become the parent of the control, and hence the control is the child of the form.

A

T

83
Q

List boxes are used to show a list of strings from which only one can be selected at a time.

A

F

84
Q

When using an ImageList control, you can add images to the ImageList at both design time and runtime.

A

T

85
Q

What does RAD stand for?

A

Rapid Application Development.

86
Q

What property specifies how the control behaves when a user resizes the window?

A

Anchor property.

87
Q

What event is most associated with Button Events?

A

Click event.

88
Q

Button, CheckBox, and RadioButton all derive from what common class?

A

ButtonBox

89
Q

To group radio buttons together so they create one logical unit, you must use what?

A

Group Box

90
Q

What are the three states a checkbox can have?

A

true, false, intermediate

91
Q

Which control is used to display and enter formatted text?

A

RichTextBox

92
Q

What control is used to show a list of strings from which one or more can be selected at a time?

A

ListBox