Glossary
This appendix provides a glossary of key terms that you may encounter while studying
C# programs.
accelerator Underlined character, usually in a menu item, that activates that menu item when
the user presses [Alt] plus the letter.
AcceptButton The button triggered in a dialog when the user presses [Enter].
accessibility Determines which code is allowed to access a class’s fields, properties, methods, and
other members. This can be
public, private, protected, internal, or protected internal.
accessor The
get and set methods that allow a class to save and return a property’s value.
Anchor Property that lets a control attach its left, right, top, and bottom edges to those of
its container.
anonymous type A data type that is automatically created by LINQ and never given a name
for your code to use.
API Application Programming Interface. A library of methods, classes, and other program-
ming tools.
array A group of values stored together in a single variable and accessed by index.
assembly The smallest independent unit of compiled code. Typically this is a DLL or
executable program.
assertion A statement that the code claims is true. If the statement is false, the program stops
running so you can decide whether a bug occurred.
backing field A private field used to store the value of a property. The property’s accessors
get and set the backing field’s value.
bit A single binary digit. A bit can hold the value 0 or 1.
breakpoint A marked piece of code that stops execution when running in the IDE.
A
596906bapp01.indd 469 4/7/10 12:35:28 PM
470
APPENDIX A Glossary
bug A programming error that makes a program fail to produce the correct result. A bug may make
the program crash, produce an incorrect result, or perform the wrong action.
by reference When you pass a parameter to a method by reference, C# passes the location of the
value’s memory into the method. If the method modifies the parameter, the value is changed in the call-
ing code as well. In C#, use the
ref and out keywords to pass values by reference.
by value When you pass a parameter by value, C# makes a copy of the value and passes the copy to
the method. Changes that the method makes to the value do not affect the value in the calling code.
byte Eight bits. When considered as an unsigned integer, a byte can hold values between 0 and 255.
When considered as a signed integer, a byte can hold values between -127 and 128
C# Pronounced “see sharp.” A general-purpose high-level programming language. It is one of
the programming languages that can run in the powerful Visual Studio integrated development
environment (IDE).
CAD See computer aided design.
camel casing A naming convention where multiple words are strung together with the first letter of
each word except the first capitalized as in
firstNameTextBox or numberOfEmployees.
CancelButton The button triggered in a dialog when the user presses [Esc].
catch When an exception occurs, a program can catch the exception to take control and perform
some remedial action (or just tell the user that something’s wrong). Also when an object raises an
event, the program can catch the event and take action.
class Defines a data type with properties, methods, events, and other code encapsulated in a package.
After you define a class, you can make as many instances of that class as you like. Very similar to a
structure except classes are reference types while structures are value types.
code-behind The event handlers and other code that sits behind a WPF user interface.
comment Text within the program that is not executed by the program. Use comments to make the
code easier to understand.
component A programming entity similar to a control except it has only code and doesn’t have
a visible appearance on the screen. You still place it on a form at design time, however, and the
program’s code can interact with it. Some components such as
ErrorProvider and ToolTip may
display visible effects on the screen.
Component Tray The area below the form where components sit.
compound assignment operators Operators such as += and &= that combine a variable’s current
value with a new value.
computer aided design A program that helps the user design something, often something graphical
such as an architectural drawing or an electronic circuit. Many CAD systems do more than just draw.
For example, they may produce lists of materials, validate electronic circuits, or calculate physical
properties of the system designed.
concatenate Join two strings together.
596906bapp01.indd 470 4/7/10 12:35:28 PM
APPENDIX A Glossary
471
constant Similar to a variable, but you must assign it a value when you declare it and you cannot
change the value later. You can use constants to make your code easier to read.
constructor A method that executes when an object is created.
control A programming entity that combines a visible appearance on the screen with code that
defines its appearance and behavior.
Coordinated Universal Time (UTC) Basically Greenwich Mean Time (GMT), the time at the Royal
Observatory in Greenwich, London. (See
en.wikipedia.org/wiki/Coordinated_Universal_Time
for details and history.)
data type A particular kind of data such as
int, string, DateTime, or TextBox. All variables must
have a data type.
dataset An in-memory representation of a data source.
default constructor The parameterless constructor that is created by default when you create a class.
deferred execution When a program delays performing some task until a later time. LINQ uses
deferred execution when it delays performing a query until the results of the query are actually needed.
derive To make one class that inherits from another.
design time The time when you are editing a program in Visual Studio. During this time, you use
the Form Designer, Code Editor, Properties window, and other IDE features to build the program.
Contrast this with run time.
DialogResult The result returned by a dialog to tell the calling code which button was clicked.
DirectX A collection of high-performance multimedia APIs that provide much better access to
graphics hardware than GDI does.
Dock Property that lets a control fill the left, right, top, bottom, or remaining area of its container.
dominant control When you select a group of controls in the Form Designer, one is marked as the
dominant control. Arranging tools use this control to determine how the controls are arranged. For
example, the Format  ➪ Align  ➪  Lefts tool aligns the selected controls’ left edges to the dominant
control’s left edge.
drag source An object that initiates a drag-and-drop operation.
drop target An object that is a candidate to receive data dropped in a drag-and-drop operation.
edit-and-continue A debugger feature that lets you modify a stopped program’s code and continue
running without stopping and restarting the program.
empty constructor A parameterless constructor.
encapsulation Detail hiding. A class hides its internal details so the rest of the program doesn’t
need to understand how they work, just how to use them.
enumerated type See enumeration.
enumeration A data type that can take one of a list of specific values.
596906bapp01.indd 471 4/7/10 12:35:29 PM
472
APPENDIX A Glossary
escape sequence A sequence of characters that represent a special character such as carriage
return or tab.
Euclid’s algorithm Also called the Euclidean algorithm. An efficient algorithm for finding the
greatest common divisor (GCD) of two numbers.
event An object raises an event to tell the program that something interesting has occurred. The
program can catch the event to take action.
event handler An event handler catches an event and takes appropriate action.
exception Object that represents some kind of error such as an attempt to divide by zero or an
attempt to parse a string that has an invalid number format.
eXtensible Application Markup Language See XAML.
factorial The factorial of a number N is written N! and equals 1 * 2 * 3 * ... * N.
Fibonacci number The Nth Fibonacci number Fib(N) is defined recursively by Fib(0) = 0, Fib(1) = 1,
and Fib(N) = Fib(N – 1) + Fib(N – 2).
field A variable defined in a class or structure not inside any method defined by the class or structure.
filter A condition on data that filters out some of the records. If you place a filter on a binding
source, the source selects only records that satisfy the filter and any display controls associated with
the source display only those records.
garbage collector A behind-the-scenes process that runs to reclaim inaccessible memory.
GDI Graphics Device Interface. A library of methods for rendering graphics in Windows used by
Windows Forms controls.
GDI+ The .NET version of GDI.
generic class A class that takes as a parameter one or more data types that it uses to work more
closely with those data types.
generic constraint A constraint on the types passed to a generic class such as requiring the type to
have a parameterless constructor or requiring that it implement the
IComparable interface.
gigabyte (GB) 1,024 megabytes.
globalization The process of building an application that can be used by users from different cultures.
greatest common divisor (GCD) The largest integer that evenly divides two other integers.
IDE See integrated development environment.
index A value that selects an item from a group. For example, in an array, the index is an integer
between 0 and one less than the number of elements in the array used to identify a specific item in
the array.
integrated development environment An environment for building, testing, and debugging
programs, such as Visual Studio.
interface Defines public properties, methods, and events that a class must provide to satisfy
the interface.
596906bapp01.indd 472 4/7/10 12:35:29 PM
APPENDIX A Glossary
473
kilobyte (KB) 1,024 bytes.
LINQ Language Integrated Query.
locale A setting that defines the user’s language, country, and cultural settings that determine such
things as how dates and monetary values are formatted.
localization The process of customizing a globalized application for a specific culture.
lower bound An array’s smallest index (always 0 in C#).
machine language A low-level language that gives instructions directly to the computer’s central
processing unit to perform tasks on the machine’s hardware. Machine language is much harder for
humans to read and understand than a higher level programming language such as C#.
magic number A value hard-coded into a program that is difficult to remember. To make code
clearer, use constants such as
taxRate instead of magic numbers such as 0.65M.
megabyte (MB) 1,024 kilobytes.
method A group of programming statements wrapped in a neat package so you can invoke it as
needed. A method can take parameters and can return a value.
method scope A variable declared inside a method and not inside any other code block has method
scope. It is visible to all of the following code within that method.
modal When the program displays a modal form, the user cannot interact with any other part of
the application until closing that form. Dialogs are generally modal. A form’s
ShowDialog method
displays the form modally.
modeless When the program displays a modeless form, the user can interact with other parts of the
application while the modeless form is still visible. A form’s
Show method displays a modeless form.
namespace A classification of classes with a common purpose. Include
using directives at the top
of a code file to tell C# which namespaces to search for classes that the code uses.
nibble Half a byte.
nondeterministic finalization The idea that you cannot tell when an object will be finalized and its
destructor run because objects are destroyed when the garbage collector runs.
nullable type A data type that can hold the special value
null in addition to whatever other values
it normally holds.
NumberStyles.Any Passed as a second parameter to
decimal.Parse, this allows that method to
correctly interpret values formatted as currency.
operator overloading Defining a new meaning for an operator such as + or * when working with
arguments of specific data types.
order by clause A clause in a LINQ query that orders the returned data.
overloading Giving a class more than one method with the same name but different parameter lists.
overriding Replacing a parent class method with a new version.
596906bapp01.indd 473 4/7/10 12:35:29 PM
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.178.234