Finals Flashcards
(92 cards)
Unlike reference types, nullable types are tested for null using the IComparable method.
F
If variable x is null and variable y is false, then x|y is false
F
The Dictionary type is used to define a collection of key-value paris.
T
What is a generic class?
It is built using whatever type or types are passed into it when it is instantiated.
Give a statement declaring the variable X to be a nullable integer type.
int?x;
What is the purpose of the null coalescing operator?
Supplies alternative values if expression is null.
What is the null coalescing operator?
”??”
Give a statement declaring the varialbe students to be a generic collection that holds a collection of objects of type Student.
List students;
C# is a typesafe language
T
Operators can be roughly classified into three categories: numary, binary, and turnary.
F
A delegate is a type that enables a program to store references to functions.
T
InC#, all classes derive from the base class Parent at the root of all classes.
F
When an object is assigned to a variable, the variable actually receives a pointer to the object.
T
Protected class members are accessible only from code that is part of the class or from a class derived from it.
T
Fields, methods, and properties can also be declared using the keyword ‘global’ which means the are static members owned by the class.
F
Automatic properties must include both a Get and Set accessor.
T
Class definitikons can be split across multiple code fiels using the ‘partial’ keyword.
T
A class that implements an interface must implement all of the members defined by the interface as public.
T
Arrays in C# are implemented as instances of the ‘System.Array class and are just one type of what are known as colleciton classes.
T
Custom collection classes can be strongly typed.
T
The ‘GetIEnumerator’ mehtod allows iterating over a class.
F
An iterator is a block of code that supplies all the values used in a foreach block.
T
The ‘is’ operator can be used in a program to check whether an object either is or can be converted into a given type.
T
What is the term for the .net method of freeing up unused memory?
Garbage colleciton.