MCSD Study Guide - Key Terms Flashcards
assignment
Providing a value for a variable
Boolean
A value that is represented as either true or false
branching
Refers to changing code execution to a different path
condition
An evaluation of operands using logical operators
conditional instructions
Instructions that evaluate Boolean expressions and take action based on the outcome of the evaluation
comment
A code line that starts with the // characters and is a way of helping to document the code so that programmers can understand what the different code segments are intended to do
complex statement
A statement that can enclose one or more simple statements into a code block surrounded by curly braces { }. Typical complex statements are those used for repetition and decision structures such as foreach { }, if { }, switch, do { }, and so on.
constant
A named value that is assigned at time of declaration and cannot be changed in code later
declaration
Used to create a variable in code
decrement
To decrease by a certain value
expression
An activity or code statement that returns a result
IEnumerable
A code component in C# that supports iteration
increment
To increase by a certain value
initialize
To set a starting value
iterator
A portion of loop that changes a value
literal
A notation used to indicate fixed values in code. Not the same as a constant. You cannot assign a value to a literal.
loop
A repetition structure that repeats instructions
modulus
Returns the REMAINDER of integer division
operator
Performs an operation on values
program flow
The logical execution of code
sentinel
A value used to signal the end for execution on a loop
simple statement
A statement that ends with a semicolon and is typically used for program actions such as declaring variables, assigning values to variables, method calls, and code branching.
spaghetti code
A term used to describe code that is complicated to follow and understand due to branching
statement
The code construct of the C# programming language that causes the application to perform an action
ternary operator
An operator that takes three arguments, a condition, a value for true, and a value for false
variables
Named values that can be changed in code
abstract method
Indicates that the thing modified has a missing or incomplete implementation. The abstract modifier can be used with classes, methods, properties, indexers, and events. Use the abstract modifier in a class declaration to indicate that a class is intended to be only a base class of other classes.
accessor methods
Methods used to access hidden member variables
class files
File that contain a C# class. Classes encapsulate data and functionality into one unit of code
classes
Coding components that enable you to create custom types that group together characteristics, methods, and events.
constructors
Class methods executed when an object of a given type is created
data structures
Components in code that are used to store data within the program
encapsulation
The hiding of details around the implementation of an object so there are no external dependencies on the particular implementation
enumerations
A distinct type consisting of a set of named constants
event publisher
The object in code that will raise the event for the listener or subscriber
event subscriber
The object that listens for an event to be raised
fields
Variables that store characteristic data for a class
heap
An area of memory used by the .NET compiler to store reference type variables
instance fields
The same as fields but are known as instance fields because they relate to an instance of an object. In other words, their values are not shared among objects of the same class
memory address
An addressable location in computer memory that is used to store and retrieve values stored there
methods
Provide the functionality for a class
modifiers
Modify declarations of types and type members
overloaded methods
Methods with identical names for procedures that operate on different data types
override
To extend or modify the abstract or virtual implementation of an inherited method, property, indexer, or event.
properties
Members that provide a flexible mechanism to read, write, or compute the values of private fields
reference types
Class files or other objects represented as references to the actual data (memory addresses)
signature
In this case, a method signature. It is the unique identifying components of the method such as return type, name, and parameters.
stack
An area of memory used by the .NET compiler to store value types during program execution
boxing
Boxing is the process of converting a value type such as int or bool into an object or an interface supported by the value’s type. This enables a program to treat a simple value as if it were an object.
CLR
Common Language Runtime
Avirtual machine that manages execution of C# (and other .NET) programs
composite format
A format item used by String.Format to indicate how an argument should be formatted. The basic syntax is {index[, length] [:formatString]}
custom formatting string
Enable you to build formats that are not provided by the standard formatting strings
explicit conversion
In an explicit conversion, the code uses an operator (such as cast) or method (such as int.Parse) to explicity tell the program how to convert a value from one type to another
Immutable
A data type is immutable if its value cannot be changed after it has been created. The String class is immutable. String methods that seem to modify a String, such as Replace and ToUpper, actually replace the String with a new value containg the modified contents.
Implicit Conversion
In an implicit conversion, the program automatically converts a value from one data type to another without any extra statements to tell it to make the conversion
intern pool
The CLR maintains a table called “intern pool” that contains a single reference to every unique string used by the program
interoperability
Interoperability enables managed code (such as C# program) to use classes provided by unmanaged code that was not written under the control of the CLR
narrowing conversion
A narrowing conversion is a data type conversion where the destination type
cannot hold every possible value provided by the source data type. Converting from a long to an int
is a narrowing conversion because a long can hold values such as 4,000,000,000 that cannot fit in an
int. Narrowing conversions must be explicit.
standard formatting string
Enables you to determine how you want a value displayed at a high level.
unboxing
Unboxing is the processing of converting a boxed value back into its original value type value.
Unicode
Unicode is a standard for encoding characters used by scripts in various locales around the
world. It enables a program to display English, Chinese, Kanji, Arabic, Cyrillic, and other character
sets. The .NET Framework uses the UTF-16 encoding, which uses 16 bits to represent each character.
widening conversion
A widening conversion is a data type conversion where the destination type can hold any value provided by the source data type; although, some loss of precision may occur. For example, converting from an int to a long is a widening conversion.
ancestor class
A class’s parent, the parent’s parent, and so on
base class
A class from which another class is derived through inheritance. Also known as a parent class or superclass
child class
A class derived from a parent class
Common Language Runtime
CLR
A virtual machine that manages execution of C# (and other .NET) programs
deep clone
A copy of an object where reference fields refer to new instances of objects, not to the same objects referred to by the original object’s fields
derive
To create one class based on another through inheritance
derived class
A child class derived from a parent class through inheritance
descendant class
A class’s child classes, their child classes, and so on
destructor
A method with no return type and a name that includes the class’s name prefixed by -. The destructor is converted into a Finalize method that the GC executes before permanently destroying the object.
finalization
The process of the GC calling an object’s Finalize method
finalization queue
A queue through which objects with finalizers must pass before being destroyed. This takes some time, so you should not give a class a finalizer (destructor) unless it needs one.
garbage collection
The process of running the GC to reclaim memory that is no longer accessible to the program
GC
garbage collector
A process that executes periodically to reclaim memory that is no longer accessible to the program
inherit
A derived class inherits the properties, methods, events, and other code of its base class
Interface Inheritance
Using an interface to require a class to provide certain features much as inheritance does (except the interface doesn’t provide an implementation).
managed resources
Resources that are under the control of the CLR
multiple inheritance
Allowing a child class to have more than one parent class. C# does not allow multiple inheritance
nondeterministic finalization
Because you can’t tell when the GC will call an object’s Finalize method, the process is called “nondeterministic finalization”
parent class
A bare class. Also known as a superclass
reachable
During garbage collection, an object is reachable if the program has a path of references that let it access the object
shallow clone
A copy of an object where reference fields refer to the same objects as the original object’s fields