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
sibling classes
Classes that have the same parent class
subclass
A derived class
subclassing
The process of deriving a subclass from a base class through inheritance
superclass
A base class. Also known as a parent class
unmanaged resources
Resources that are not under the control of the CLR
unreachable
During garbage collection, an object is unreachable if the program has no path of references that let is access the object
checked
By default, a program doesn’t throw OverflowExceptions when an arithmetic operation
causes an overflow. A program can use a checked block to make arithmetic expressions throw those
exceptions.
contravariance
A feature of C# that enables a method to take parameters that are from a superclass of the type expected by a delegate. For example, suppose the Employee class is derived from the Person class and the EmployeeParameterDelegate type represents methods that take an Employee object as a parameter. Then you could set an EmployeeParameterDelegate variable equal to a method that takes a Person as a parameter because Person is a superclass of Employee. When you invoke the delegate variable’s method, you will pass it an Employee (because the delegate requires that the method take an Employee parameter) and an Employee is a kind of Person, so the method can handle it.
contravariant
A variable is contravariant if it enables contravariance.
covariance
A feature of C# that enables a method to return a value from a subclass of the result expected by a delegate. For example, suppose the Employee class is derived from the Person class and the CreatePersonDelegate type indicates a method that returns a Person object. Then you could set a CreatePersonDelegate variable equal to a method that returns an Employee because an Employee is a kind of Person.
delegate
A data type that defines a method with given parameters and return value.
error checking
The process to anticipate errors, check to see if they occur, and work around them,
for example, validating an integer entered by the user in a TextBox instead of simply trying to parse
it and failing if the value is not an integer. See also exception handling.
exception handling
The process to protect the application when an unexpected error occurs, for example,
protecting the code in case a file downloads fails when it is halfway done. See also error checking.
expression lambda
A lambda expression that has a single expression on the right side.
lambda expression
A concise syntax for defining anonymous methods.
publisher
An object that raises an event.
statement lambda
Similar to an expression lambda except it encloses its code in braces and it can
execute more than one statement. If it should return a value, it must use a return statement.
subscriber
An object that receives an event.
try-catch-finally block
The program structure used to catch exceptions. The try section contains the
code that might throw an exception, catch sections catch different exception types, and the finally
section contains code to be executed when the try and catch sections finish executing.
unhandled exception
Occurs when an exception is thrown and the program is not protected by a
try-catch-finally block, either because the code isn’t inside a try section or because there is no
catch section that matches the exception.
asynchrony
Operations that are run in a nonblocking fashion. When a method needs to call another
method that potentially can block, instead of calling that method directly you can apply different
techniques to avoid the blocking of the calling method.
Asynchronous Pattern Model (APM)
When using this pattern, a method is split in two parts, a
Begin and an End part. The begin part is responsible to prepare the call and to return the caller
right away, and the end part is the one called to get back the result. The method was run in a
thread from the thread pool. It is not recommended to use this approach for new development;
instead use the new TAP.
atomic operation
An operation that will be run at once without being interrupted by the scheduler.
deadlock
Occurs when two or more threads try to acquire a lock on a resource that one of the other
threads has locked already; neither of them can make more progress. There are four conditions that
need to be fulfilled and that lead to a deadlock: mutual exclusion, hold and wait, no preemption, and
circular wait.
Event-based Asynchronous Pattern (EAP)
This pattern requires a method to be suffixed with Async
and provide events and delegates to signal when the method finished or failed. It is not recommended
for new development to use this approach; instead use the new TAP.
fork-join pattern
The process of spawning another thread from the current thread (fork) to do
something else while the current threads continue their work and then to wait for the spawned
thread to finish its execution (join).
multithreading
The capability of an operating system, or a hardware platform to have several threads
of execution at the same time.
mutual exclusion
Mutual exclusion is the problem, first solved by Edsger W. Dijkstra, of ensuring
that two threads can’t be in the same critical section at the same time.
race condition
Occurs when two or more threads access shared data, writing at the same time. If
the access to data is for read purposes only, there is no problem. But when several threads try to
write, one thread might overwrite the data written by another thread, not taking in consideration
the change.
scheduler
A component of the operating system that ensures that threads are given access to the
CPU in a fair manner, avoiding situations when a thread monopolizes the CPU.
task
A unit of work. It normally represents an asynchronous operation that is part of a bigger problem.
Task Parallel Library (TPL)
A .NET library created by Microsoft that tries to abstract away and
simplify the code that deals with threads.
Task-based Asynchronous Pattern (TAP)
A pattern based on a single method that returns Task or
Task objects that represent the asynchronous work in progress. This is the recommended
pattern for the new development.
thread
The smallest unit of execution that can be independently scheduled by the operating system.
thread pool
The thread pool represents a pool of precreated threads that can be used by the tasks, or
to queue work items, or to run asynchronous I/O operations.
anonymous method
Enables you to associate a block of code with a delegate without declaring the
method signature.
assembly
A compiled piece of code in a DLL or EXE file.
attribute
Enables you to associate metadata with assemblies, types, methods, properties, and so on.
Code Document Object Model (CodeDOM
Enables the developer to generate code in multiple languages
at run time based on a single code set.
context
When loading an assembly using reflection, the context is where reflection searches for
the assembly.
contravariance
Permits parameter types that are less derived than the delegate’s parameter types.
covariance
Enables you to have a method with a more derived return type than the delegate’s
return type.
delegate
A type that references a method.
expression lambda
A lambda expression that contains only one statement for the body.
Expression Tree
Code in a tree-like structure where each node is an expression.
field
A variable defined in a class or struct.
lambda expression
Shorthand syntax for an anonymous method that can be associated with a
delegate or expressions tree.
load context
When loading an assembly using reflection, this context contains the assemblies found
by probing.
load-from context
When loading an assembly using reflection, this context contains the assemblies
located in the pat passed into the LoadFrom method.
module
A file that composes an assembly. Typically this is the DLL or EXE file.
probing
The process of looking in the GAC, the host assembly store, the folder of the executing
assembly, or the private bin folder of the executing assembly to find an assembly.
reflection
Provides classes that can be used to read metadata or dynamically invoke behavior from
a type.
reflection-only context
When loading an assembly using reflection, this is the context that contains
the assemblies loaded with the ReflectionOnlyLoad and ReflectionOnlyLoadFrom methods.
statement lambda
A lambda expression with more than one statement in the body of the expression.
target
The class, property, or method that contain metadata defined by an attribute.
type
Any class, interface, array, value type, enumeration, parameter, generic type definition, and
open or closed constructed generic type.
ADO.NET Entity Framework
An object relational mapping tool that provides a graphical user interface
that generates to code to perform operations against a database using ADO.NET
array
The most basic type used to store a set of data.
async
Indicates that the method, lambda expression, or anonymous method is asynchronous.
await
Suspends the execution of a method until the awaited task completes.
boxing/unboxing
Boxing is the process of converting a value type to a reference type. Unboxing is
the process of converting a reference type to a value type.
collection
A generic term that encompasses lists, dictionaries, queues, stacks, hash tables, and other
objects that can contain sets of data.
connection object
An object in ADO.NET that allows you to open and execute commands against
a database.
IComparable interface
A class that implements the IComparable interface can be sorted when used in a collection or array.
indexer
A method that is used when referencing an element in an array or collection by using square
brackets, [], and its index.
JSON
JavaScript Object Notation is a lightweight data-interchange format.
Object Relational Mapping (ORM)
A computer software term for tools that convert data between
type systems using an object oriented programming language.
OData ATOM
The XML representation of data returned from an OData query.
Open Data Protocol (OData)
A web protocol for querying and updating data through the Internet
or intranet.
shallow copy
Creating a new copy of an object that copies all value types and copies object references
for reference types.
serialization
The process of converting an object into a stream of bytes that can be stored
or transmitted.
stream
An abstract class that provides a generic view of a sequence of bytes.
Text Transformation Template Toolkit (T4 Template)
A file that contains text blocks and control
statements that enable to you to generate a code file.
WCF Data Services
Enables you to use OData to expose and consume data over the web or
an intranet.
anonymous type
A type created with read-only properties without having to write the code to
declare the class.
composite keys
Contains multiple properties that you need for the purpose of a join.
deferred execution
Execution of a LINQ query is deferred until the result is enumerated or by
calling a function on the result.
Goes To operator
The Goes To operator is the => signs in a lambda expression.
implicitly typed variable
A variable that has its type determined by the expression on the right side
of the initialization statement. Use the keyword var to declare an implicitly typed variable.
inner sequence
When using the method-based Join function, this refers to the sequence passed into
the Join method as a parameter.
Language Integrated Query (LINQ)
A set of features that extends powerful query capabilities to C#.
method-based query
A feature of LINQ that uses extension methods on types that implement the
IEnumerable or IQuerable interface to query the data.
outer join
Selects all elements from one sequence when joined to another sequence even if there is
not a match on the joined property.
outer sequence
When using the method-based Join function, this refers to the sequence calling the
Join method.
ParamArray
A parameter to a method that enables you to pass an unknown number of parameter to
the method.
predicate
The code executed in a where clause for a query expression.
projection
Selecting a subset of properties from a type that creates a new anonymous type.
query expression
A feature of LINQ that enables you to query any type that implements the
IEnumerable or IQueryable interface by using syntax that is easy to comprehend.
assertion
A piece of code that makes a particular claim about the data and that throws an exception
if that claim is false. In C# you can use the System.Diagnostics.Debug.Assert method to
make assertions.
character class
A regular expression construction that represents a set of characters to match.
conditional compilation constant
A predefined symbol created by Visual Studio that you can use with
the #if, #elif, #else, and #endif directives to determine what code is included in the program. These
include DEBUG and TRACE, which are normally defined in debug and release builds, respectively.
data validation
Program code that verifies that a data value such as a string entered by the user
makes sense. For example, the program might require that a value be nonblank, that a monetary
value be a valid value such as $12.34 not “ten,” or that an e‑mail address contain the @ symbol.
escape sequence
A sequence of characters that have special meaning, for example, in a regular
expression.
inline options
Options set in a regular expression by using the syntax (?imnsx).
instrumenting
Adding features to a program to study the program itself.
logging
The process of instrumenting a program, so it records key events.
pattern
A regular expression used for matching parts of a string.
performance counter
A system-wide counter used to track some type of activity on the computer.
profiler
An automated tool that gathers performance data for a program by instrumenting its code or
by sampling.
profiling
The process of instrumenting a program to study its speed, memory, disk usage, or other
performance characteristics.
regular expression
An expression in a regular expression language that defines a pattern to match.
Regular expressions let a program match patterns and make replacements in strings.
sanity check
A test on data to see if the data makes sense. For example, if a user enters the cost
of a ream of paper as $1e10.00, that might be a typographical error, and the user may have meant
$100.00. Sometimes the user might actually have intended an unusual value, so the program must
decide whether to reject the value or ask the user whether the value is correct.
tracing
The process of instrumenting a program so that you can track what it is doing.
assembly
An assembly is the unit of reuse, deployment, versioning, and security.
asymmetric encryption (public key)
A cryptographic algorithm that uses two complementary keys,
one for encryption and one for decryption. Data encrypted with the public key can only be decrypted
using the private key.
Certificate Authority (CA)
An entity that issues digital certificates.
Certificate Revocation List (CRL)
A list of digital certificates that has been revoked for various
reasons. You shouldn’t use a certificate if it is revoked.
certificate stores
A special storage location on your computer, used to store encryption certificates.
Common Language Runtime (CLR)
CLR is the component of .NET Framework responsible for
running .NET applications and managing their running environment.
cryptography
The practice and study of techniques for secure communication.
decryption
The process of decoding previously encrypted data so that it can be used by your
application.
encryption
The process of encoding data so that it cannot be read by an unauthorized person.
Global Assembly Cache (GAC)
GAC is a machine-wide code cache.
hash bucket
A data structure that holds items that share the same hash value.
hashing
Used to map data structures of variable length, to fixed size data structures. Hashing the
same data using the same algorithm will always yield the same hash value.
initialization vector (IV)
A data array used by the encryption algorithms to encrypt the first data
block. The IV doesn’t need to be kept secret.
Intermediate Language (IL)
The result of compiling a .NET application from source code.
Just In Time compiler (JIT)
A component of the .NET that transforms the IL into binary code that
can be run on the target platform.
Message Authentication Code (MAC)
A family of cryptographic algorithms used to provide data
integrity and authenticity.
private key
The public and private keys are a pair of complementary keys used together in the
asymmetric encryption. Data encrypted with the private key can only be decrypted using the public
key, and data encrypted with the public key can only be decrypted using the private key.
public key
The public and private keys are a pair of complementary keys used together in the
asymmetric encryption. Data encrypted with the private key can only be decrypted using the public
key, and data encrypted with the public key can only be decrypted using the private key.
Public Key Infrastructure (PKI)
The infrastructure needed to handle digital certificates.
Secured Hash Algorithm (SHA)
A family of cryptographic algorithms used to calculate hashes
published by NIST.
Secure Socket Layer (SSL)
A cryptographic protocol used for secure communication over the Internet.
symmetric encryption (shared secret)
A cryptographic algorithm that uses the same key for both
encryption and decryption of data.
Transport Layer Security (TLS)
A cryptographic protocol used for secure communication over the
Internet, the successor of SSL.