|
|
 |

 |
|
Microsoft® Visual C#™ .NET (Core Reference)
|
|
 |
Author |
 |
Mickey Williams
|
 |
|
Pages |
784
|
|
Disk |
1 Companion CD(s)
|
|
Level |
All Levels
|
|
Published |
05/15/2002
|
|
ISBN |
9780735612907
|
|
ISBN-10 |
0-7356-1290-0
|
|
Price(USD) |
$59.99
To see this book's discounted price, select a reseller below.
|
|
|
|
|
 |
|
|
Index
Send feedback about this index to mspindex@microsoft.com.
Symbols and Numbers
- (subtraction) operator, 106
-- (decrement) operator, 106-7, 273
! (exclamation mark) after top-level menu items, 391
! (negation) operator, 102, 104
!= (inequality) operator, 103
% (modulo (remainder)) operator, 106
%= (remainder assignment) operator, 111
& (ampersand)
prefixing a character in caption text, 331
prefixing a letter in a menu item's text caption, 393
& (AND (full evaluation)) operator, 104, 105
& (AND) operator, 107, 108-9
& (address of) operator, 114, 292
&& (AND (short-circuit)) operator, 104, 125
overloading, 123-25
tracing the Visual C# .NET compiler, 124-25
&= (bitwise-AND assignment) operator, 111, 112
* (multiplication) operator, 102, 106
* (pointer indirection) operator, 114
* (unsafe context) operator, 292
*= (multiplication assignment) operator, 111
.(dot operator). See dot operator (.)
. (ellipsis) after popup menu items, 391
/ (division) operator, 102, 106
/* and */, beginning and ending comment blocks, 26
/= (division assignment) operator, 111
:: (scope resolution) operator, 39, 114
?: (conditional) operator, 102, 112
@ (at sign) operator, indicating a string literal, 92
[] (index) operator, 114, 117
[] (subscript) operator, 193
^ (XOR (exclusive OR)) operator, 104, 105, 107, 110
^= (bitwise-XOR assignment) operator, 111, 112
{ } (curly braces)
enclosing controlled statements, 134
enclosing unsafe code, 290
| (bitwise OR operator), combining MessageBoxOptions values, 314
| (OR (full evaluation)) operator, 104, 105
| (OR) operator, 107, 109-10, 189, 314
|| (OR (short-circuit)) operator, 104, 123-25
|= (bitwise-OR assignment) operator, 111, 112
+ (addition) operator, 92, 106, 166
++ (increment) operator, 102, 106-7, 273
+= (addition assignment) operator, 110, 111, 166
< (less than) operator, 103, 104
<% %> delimiters, 651
<< (left shift) operator, 107, 108
<<= (left-shift assignment) operator, 111
<= (less than or equal to) operator, 103, 104
= (assignment) operator, 103, 110, 111
-= (subtraction assignment) operator, 110, 111, 166-67, 340
== (equality) operator, 92, 103
> (greater than) operator, 103, 104
-> (member access) operator, 39, 114
-> (unsafe context) operator, 292
>= (greater than or equal to) operator, 103, 104
>> (right shift) operator, 107, 108
>>= (right-shift assignment) operator, 111
~ (tilde), indicating a destructor, 55
~ (complement) operator, 107, 110
( ) (cast) operator, 114
( ) (parentheses), altering the precedence of operators, 116
3-D controls, shadow for, 440
32-bit color values, representing in the .NET Framework, 322
A
A property, exposed by the Color structure, 439
Abort method of a thread, 271
Aborted member of the ThreadState enumeration, 270
AbortRequested member of the ThreadState enumeration, 270
AbortRetryIgnore value of the MessageBoxButtons enumeration, 312
AboveNormal priority for a thread, 272
abstract classes, 42, 67
abstract declarations, 195
abstract indexers, 195
abstract keyword, 42, 56
abstract methods, 42, 55-56
AcceptButton property, 341
AcceptChanges method of the DataSet object, 571
AcceptsReturn property of the TextBox class, 346
AcceptsTab property of the TextBox class, 346
access points, 684
access protection level for indexers, 209
accessibility, 58-61
accessibility levels, 38
Action property of the QueryragEventArgs argument, 562
action-related mouse pointer values, 379
Activated event, 387
Active Server pages. See ASP
ActiveBorder property
of the SystemBrush class, 445
of the SystemColors class, 440
ActiveCaption property
of the SystemBrush class, 445
of the SystemColors class, 440
ActiveCaptionText property
of the SystemBrush class, 445
of the SystemColors class, 440
of the SystemPens class, 459
ActiveLinkColor property of the LinkLabel class, 348, 349
ActiveX Data Objects. See ADO
add element, 250
Add method
adding an image to an ImageList control, 482
adding an item at the end of a list box, 351-52, 352-53
adding a TabPage object to a TabControl programmatically, 489
adding menu items to the collection, 396-97
Add New Item dialog box, 37-38, 307, 646
Add Reference dialog box, 65
Add To Solution radio button, 22
Add Web Reference dialog box, 686, 698
Add Web Service from the IDE Project menu, 689
Add Windows Form from the Project menu, 307
AddAnnuallyBoldedDate method, 499
AddBoldedDate method, 498
AddBranch method, 525, 527
addition assignment operator (+=), 110, 111, 166
addition operator (+), 92, 106, 166
AddMonthlyBoldedDate method, 499
AddOnEventName method, 175
AddRange method
adding an array of menu items, 397
adding multiple items to a list box, 352
adding multiple pages to a TabControl control, 489
address of (&) operator, 114, 292
AddStrip method, 532
AddTextToToolBarButtons method, 547
AddToArray method, 200
ADO (ActiveX Data Objects), 567
ADO.NET, 567
disconnected model for, 568
new features in, 567-69
System.Data namespace reference required for, 305
tight integration with XML, 568
ADO.NET dataset
binding to, 671-72
creating a Web service method to return, 690
AdRotator control, 656
AfterCheck event, 526
AfterCollapse event, 526
AfterExpand event, 526
AfterLabelEdit event, 526
AfterSelect event, 526
AfterSelect event handler in the RegistryViewer application, 539
al.exe, 8, 191
Alignment property
with the Pen class, 461, 462
with the StatusBarPanels class, 416
with the StringFormat class, 431
with the TabControl class, 491, 492
All value in the DragDropEffects enumeration, 558
allocation of structures, 77
AllowDrop property
enabling a drag and drop target, 557
setting to allow drag and drop, 559-60
AllowedEffect property of DragEventArgs, 558, 559
AllowMultiple parameter of the AttributeUsage attribute, 188, 189
alpha component, 322, 437
Alt property of KeyEventArgs, 389
AlwaysUnderline value from the LinkBehavior enumeration, 350
ambiguous type names, 63-64
ampersand (&)
prefixing a character in caption text, 331
prefixing a letter in a menu item's text caption, 393
Anchor property, 503, 504, 505-6
anchor values for LineCap styles, 462
AnchorMask value in the LineCap enumeration, 462, 463
AnchorStyles enumeration, 504
AND (full evaluation) operator (&), 104, 105
AND (short-circuit) operator (&&), 104, 125
overloading, 123-25
tracing the Visual C# .NET compiler, 124-25
AnnuallyBoldedDates property, 499
AppDomains, 268
Appearance enumeration, 334
Appearance property
changing from Normal to Flat, 546, 547
with the CheckBox class, 335
with the RadioButton class, 334-35
with the TabControl class, 491
for a toolbar, 544
App.ico file, 302
Application class, 299
invoking static methods and properties exposed by, 315
properties for determining paths, 317-18
application data, storing, 317
application domains, 268
Application object, gaining access to, 685
application state, 664
ApplicationContext class, 299
ApplicationContext object, 315-16
ApplicationExit event, 319-20
Application.Run method, 305-6, 315
applications
closing, 318-20
configuration files for, 249-51
creating for the .NET platform, 4-9
writing for Windows, 317
AppStarting mouse pointer value, 379
AppWorkspace property
of the SystemBrush class, 445
of the SystemColors class, 440
ARGB (alpha, red, green, blue) components, 322
ArgumentNullException exception, 164
arithmetic operators, 105-7
arithmetic overflow errors, 116-17
ArrayList class, 194-95, 224
ArrayList collection in the ClickRects application, 437
arrays, 86-91
accessing with the subscript operator ([]), 193
clearing, 88
cloning, 87
growing automatically, 200
initializing, 86-87
multidimensional, 89-91
progressively dividing into smaller subarrays, 294
of reference types, 87
reversing the order of, 88
sorting, 88
types of, 89-90
of value types, 87
Array.Sort method, 214
Arrow mouse pointer value, 379
arrow shape pointer, 378
ArrowAnchor value in the LineCap enumeration, 463
as keyword, 75-76
ascender, 469
AscendingComparer class, 215-16, 217
.asmx file, 684, 693
ASP (Active Server pages), 636, 639
.asp extension, 639
ASP.NET, 635
ASP capability in, 639
features of, 636-38
providing security for Web services, 701
requirements for working with, 636
security in, 638
ASP.NET objects, 685
ASP.NET Web Application template, 23, 24
ASP.NET Web Service template, 23, 24
.aspx extension, 639, 650
.aspx file, 649, 650
aspx.cs file, 652
assemblies, 5-6, 64
compiling for execution, 7-8
creating strong names for, 190-92
deploying into the global assembly cache, 191-92
loading external, 7
multi-module, 8
parts of, 6
registering, 191
removing from the global assembly cache, 191
retrieving custom attribute information for, 187-88
signing with a key pair, 191
tagging with attributes, 183
types of, 7
assembly attributes in the AssemblyInfo.cs file, 183, 318
Assembly Linker, 8, 191
assembly metadata, 180
AssemblyInfo.cs source file, 22, 25, 302, 303
assembly attributes in, 318
AssemblyKeyFile attribute in, 191
containing assembly attributes, 183
in a Web service, 688
AssemblyKeyFile attribute, referencing a key pair, 191
Assert method, 245, 246-47
assertion violation, 260-61
assignment operator (=), 103, 110, 111
assignment operators, 110-12
associative array, 198-201
associative array collections, 201
AssociativeArray class, 198-201
changes made to provide enumerator support, 206-7
enumerator providing iteration access to, 204-6
Asterisk value in the MessageBoxIcon enumeration, 312
asymmetrical conversions, 126
asynchronous pieces, partitioning work into multiple, 273
asynchronous tasks, 284-89
atomic operations, 273
attribute targets, explicitly providing, 183
attribute types, 183-84
attributes, 156, 179-80
adding to an XML file, 602
attaching to a field, 186
C# syntax with, 179-80
defining custom, 181-89
determining whether to use, 184-88
resolving, 180-81
specifying a target for, 183
AttributeTargets enumeration, 188-89
AttributeUsage attribute, 188
Authentication Methods dialog box, 702
authentication/authorization security in ASP.NET, 638
Authenticode signature, 190
AuthorAttributeCheck class, 185-86, 187
AutoFlush method, 245
AutoPostBack property, 657
AutoResetEvent class, 278, 279-80
Autos window, 262
AutoScroll property, 367
AutoScrollMargin property, 367
AutoScrollMinSize property, 367
AutoSize property, 416
AutoSize value in the PictureBoxSizeMode enumeration, 481
B
B property, exposed by the Color structure, 439
BackColor property
of the Button class, 329, 330
of the Form class, 321, 323
for the MonthCalendar control, 499
background color for forms, 321, 323
Background member of the ThreadState enumeration, 270
background threads, 273
BackwardDiagonal value in the LinearGradientMode enumeration, 455
Bank example
on the companion CD, 173
new version using an event, 176-79
base classes
communicating with, 42-43
implementing behaviors common to all controls, 336
initializing in the object construction process, 52-53
relationship with subclasses, 41
shared by descendant classes, 40
base keyword, 42-43
basic types, 33-34
BeforeCheck event, 526
BeforeCollapse event, 526
BeforeExpand event, 526
BeforeLabelEdit event, 526
BeforeSelect event, 526
BeginTransaction method of the Connection class, 576-77
BeginUpdate method
adding tree nodes to a TreeView control, 525
turning off redrawing of a list box control, 354
BelowNormal priority for a thread, 272, 273
Bevel value in the LineJoin enumeration, 463
binary operators, 102, 117
Binding class, 572
bit flags, 559
bit patterns, manipulating for scalar types, 107-10
bitwise AND operator (&), 107, 108-9
bitwise complement operator (~), 107, 110
bitwise operators, 107-10
bitwise OR operator (|), 107, 109-10, 314
bitwise XOR (exclusive OR) operator (^), 104, 105, 107, 110
bitwise-AND assignment operator (&=), 111, 112
bitwise-OR assignment operator (|=), 111, 112
bitwise-XOR assignment operator (^=), 111, 112
Bold property of a font, 473
BoldedDates property, 497, 498
boldface dates, 498
boldface style for a font, 470
bool parameter of the RegisterWaitForSingleObject method, 289
bool type, 34
bool values, returning as error codes, 68
Boolean tests, implicit conversions for, 135
Boolean types, implicit conversion from scalar not allowed, 105
BooleanSwitch class, 105
border styles for forms, 320-21
BorderStyle enumeration, 347
BorderStyle property
creating a visible boundary for a panel control, 369
of the StatusBarPanels class, 416
of a text box control, 346-47
for a toolbar, 544
Bottom value
in the AnchorStyles enumeration, 504
in the DockStyle enumeration, 506
in the TabAlignment enumeration, 492
bounding rectangle for text, 429-30
boxing, 84-85
branches in TreeView, 522-23
break statement, 149, 150
Breakpoint Condition dialog box, 263-64
Breakpoint Properties dialog, 263
breakpoints
adding to the Call Stack window, 265
managing, 262
setting, 261-64
Brush class, 444, 445
Brush object, 434, 460-61
Brush property from the Pen class, 461
brushes, 444, 446-47
Brushes class, 446
bubble sort, 162-63
bubble sort algorithm, 163
buckets. See hash buckets
buffer, storing elements of a queue, 225
BufferResponse property, 687
Build category in the Configuration Properties folder, 27
Build Comment Web Pages dialog box, 27
Build property page
in the Configuration Properties folder, 239
enabling the /unsafe switch, 290
Build Solution from the Build menu, 29
BuildAction property of a mouse pointer, 385
built-in comparison classes, 217-18
built-in data types, 34-35
Button class, 327-33
appearance properties exposed by, 329, 330
events commonly handled, 336-37
button classes, 327-37
button clicks, translating key presses into, 340-41
Button control for a standard user interface, 654
button controls, programming, 648-49
Button property of the MouseEventArgs class, 373
ButtonBase class, 327
ButtonClick event handler, 544
buttons
adding to a form, 328-29
associating with a DialogResult value, 333
changing the captions for, 331
creating for a toolbar, 542
techniques for adding to forms, 328
Buttons value in the TabAppearance enumeration, 492
byte type, 34
C
C format character for numeric types, 129
C language
operator [] method, 193
sending debug and trace messages compared to Visual C# .NET, 237
C++
classes compared to C# classes, 38
compared to Visual C#, 37
conditional compilation in, 238
enumerators compared to C# enumerators, 78
member variables compared to fields, 46
operator [] method, 193
C#. See Visual C# entries
CacheDuration property of the WebMethod attribute, 687
Calculator1 Web Forms page
creating, 645-46
examining, 649-53
Calculator2 Web Forms page, 664-65
adding code to, 666-68
creating, 666
Calendar control in Web server, 656
calendar grid, 496
CalendarDimensions property, 496
call stack, 241, 264
allocating memory from, 293
displaying, 17, 241-43, 264
examining during debugging, 264-65
examining for catch clauses to handle exceptions, 70
generating a string describing, 242
tracing, 241-44
Call Stack window, 264-65
callback methods, 162-65
calling thread, blocking, 279
Cancel links in the edit mode of a DataGrid control, 679
Cancel value in the DragAction enumeration, 562
CancelButton property, 341
CanFocus property, 386
captions
creating for group box controls, 369
creating TabPage objects with, 488
specifying for forms, 322, 323
specifying the color used for drawing text, 330
Capture property, 378
case clauses with multiple statements, 139-40
case labels
falling through, 138-39
specifying string values, 139
in a switch statement, 137-38
terminating in a switch statement, 150
case levels, 138
CaseInsensitiveComparer class, 217-18
case-sensitive comparison, performing on strings, 217
cast expression, 116
cast operator, 74, 114, 117
C++'s compared to user-defined conversions, 127
explicitly converting types, 126
casting, 74-76
catch blocks, 68-69, 154
catch clauses
appending multiple, 71
evaluating sequentially, 71-72
transferring program execution to, 69
categories
of exceptions, 73
of members, 45
CausesValidation property for a control, 341, 342
Ceiling method, 425
center gradient point, 457
Center value in the StringAlignment enumeration, 432
CenterImage value in the PictureBoxSizeMode enumeration, 481
CenterParent value of the FormStartPosition enumeration, 322
CenterPoint property, 457
CenterScreen value in the FormStartPosition enumeration, 322
chain of delegates, 166-67
Changed event, 207
Chaos value in the transaction IsolationLevel enumeration, 577
char type, 34
character sets for Font objects, 472
check box controls, 335-36
check boxes
in the DateTimePicker control, 501
relationship to buttons, 327
check marks, adding to menu items, 401
CheckBox class, 335-36
CheckBox control, 654
CheckBoxList control, 655
checked keyword, 116
checked list boxes
checking items in, 361-62
creating, 360-63
handling events from, 362-63
checked operator, 115
Checked property
with the CheckBox class, 335
in the Menu Designer Properties window, 393
with the MenuItem class, 401
for the radio button control, 334
checked state for a check box control, 336
CheckedIndexCollection, 361
CheckedIndices property, 361
CheckedItemCollection, 361
CheckedItems property, 361
CheckedListBox class, 360-63
CheckOnClick property, 361
CheckState enumeration, 335
child controls, referencing in the Controls collection, 368
child nodes. See subnodes in the DOM structure
child windows, managing in Visual Studio .NET, 12-13
ChildNodes arrays, 617
circle, drawing around the current date, 496
Clamp value in the WrapMode enumeration, 448
Class attribute in the WebService directive, 685
class constructors. See static constructors
class declarations, semicolon not required after, 38
Class icon in the Add New Item dialog box, 37, 38
class keyword, 28, 38
Class Library template, 23
class members, 45-55
accessibility levels for, 60
accessibility options for, 58
class name, referencing static fields through, 46
Class View window in Visual Studio .NET, 14
classes, 33, 37
accessing the DOM, 615-16
adding, 37-38
declaring, 28, 38-39
declaring as abstract, 41-42
declaring as sealed, 42
declaring as unsafe, 291
implementing an interface, 66
inheriting an interface with an indexer, 198
interfaces and, 67
involved in attribute interactions, 181
members of, 45-55
naming, 30
Clear button, creating a handler for, 649, 668
Clear method
of the Queue class, 224
removing all items from the collection, 398
removing all listeners, 253
removing every item in a list box, 354
removing images from an ImageList control, 483
removing TabPage objects from a TabControl control, 489
of the Stack class, 229
of a text box control, 408
with the TextBox class, 344
Clear static method, 88
Click event
of ClearButton control, 649
handling for mouse selection, 374, 375
handling in LinkLabel, 348
raised by MenuItem objects, 400
raised by the Button class, 337
raising, 334
Click event handlers
creating new menu items associated with, 397
for the shortcut menu in ControlContextMenu, 412-13
in SimpleEdit, 406-10
ClickRects application, 435-37
Clicks property of the MouseEventArgs class, 373
client area of a control, 427
client digital certificates, 703-4
client script in a Web Forms page, 640
client scripting in ASP.NET, 640
client-independent code, 641
ClientRectangle property, 427
clients, providing event notifications to, 173
clipboard, 551
copying to, 551-52
demonstrating formats for data, 554
formats, 552, 553-55
hooking into events, 555
retrieving data from, 552-53
storing the same data in multiple formats, 555-56
Clipboard class, 551
ClipboardFormatsAvailable sample application, 554-55
ClipboardSetDataObject application, 556
ClipRectangle property of the PaintEventArgs parameter, 428
Clone method
cloning an array, 87
of the ICloneable interface, 220
cloning, 221
Close method, 578
closing an XmlTextWriter object, 603
freeing resources with, 96-97
of the main form, 319
from the Trace and Debug classes, 245
of the XmlTextReader, 609
Close Solution radio button in the New Project dialog box, 22
CloseConnection member of the CommandBehavior enumeration, 585
closed state in a TreeView control, 524
Closing event, 316
CLS (Common Language Specification), 36
code
compiling conditionally, 237-40
critical sections of, 275-76
generated by the Web Forms Designer, 652-53
code access security, 5
Code Editor
defining collapsible code regions for, 305
opening the Calculator1.aspx.cs file, 648
code execution, guaranteeing, 72-73
code file, opening for a Web Forms page, 666
code paths, selecting conditionally, 134-40
code regions, declaring as unsafe, 290
Codebehind attribute of a WebService directive, 684-85
code-behind files, 653
code-level security, 638
CollapseAll method, 522
collapsible code regions, 305
Collect method, 99
collection classes. See also collections
minimum interface for, 219-20
specialized, 234-36
storing objects in, 219-36
collection interfaces, 219-24
collection key as the index parameter, 222
collection objects, thread safety for, 282
collections. See also collection classes; individual collections
depending on stable hash codes, 118
in a DomainUpDown control, 478
foreach loops with, 145
invalidating associated enumerators, 204
leaving unsynchronized, 282
overwriting or clearing elements in, 144
Collections namespace, 305
collisions, 232
Color common dialog box, 441-44
Color enumeration, used by LinkLabel, 349
Color instances, 437-39
Color property
with the ColorDialog class, 443
with the Pen class, 461
with the SolidBrush class, 447
Color structure, 322, 437, 439
Color type, 322
Color value, constructing a Pen object with, 460
ColorDepth enumeration, 483
ColorDepth property, 483
ColorDialog class, 442-43, 485
colors in the .NET Framework, 437
ColorUpDown application, 478-79
column styles, 519
combo box controls, 363-66
ComboBox class, 363-66
ComboBoxStyle enumeration, 364
Command class, 569
Command event of buttons, 667
Command objects
constructing, 579-80
methods for executing commands, 583-85
command text, providing for a Command object, 580
Command window in Visual Studio .NET, 17
CommandBehavior enumeration, 584-85
command-line applications, 24
command-line arguments, 145
CommandName property, 666, 667-68
commands
associating with the Data Adapter class, 587-88
executing, 583-85
specifying the type of, 581
CommandText property, 580, 585
CommandTimeout property, 581
CommandType property, 581
comment blocks, 26
comment tasks, 14
comment tokens, 20
commenting sources, 26-27
comments, adding to an XML file, 600
common controls, 509
common dialog boxes, 300
common language runtime, 4-5
Common Language Specification (CLS), 36
common type system, 35
CommonAppDataPath property, 317-18
companion CD
Bank example, 173
BattingAverage value type code, 121
ClickRects application, 435
companion CD,
ClipboardFormatsAvailable sample application, 554
ClipboardSetDataObject application, 556
ColorUpDown application, 478-79
ControlContextMenu project, 411
Controls example project, 365
CursorSwap sample application, 383-84
DatagridDbconnSimple directory, 514
DisplayKeys program, 388-89
DragDropSample application, 561-63
FileDropTarget application, 559
HatchSelection application, 451
Listview Drives folder, 531
ListViewDrives application, 534
MouseEvents project, 375
ReadXML application, 609
RegistryTree directory, 524
RegistryTreeWithClass directory, 528
RegistryViewer folder, 537
RichTextBoxPad example application, 485
SampleData.xml file, 518, 519
SimpleEdit project, 402, 443-44, 473
SimpleForm project, 302
SimpleTree view application, 522
SingleInstance project, 281
StatusBars project, 420
TBBStyle application, 549
ToolbarStyles sample application, 545
UnsafeSort project, 293
VisualCSharpCorRef project, 644-45
XMLDoc application, 619
XMLListener application, 255
XMLWrite application, 603
Compare method with IComparer, 215
Comparer class, 217
Comparer object, 217
CompareTo method, 212-14
CompareValidator control, 655
comparison classes
built-in, 217-18
creating multiple, 215-17
comparison operators. See also relational operators
implementing specialized versions in pairs, 117-18
overloading, 121
compilation of projects, 29-30
compiled native image, 8
compiled pages in ASP.NET, 637
compiler
generating assemblies, 6
restrictions enforced for events, 173-74
component registration, eliminating the need for, 6
component versioning, default parameters and, 48
ComponentModel namespace, 305
components of colors, 437
conditional breakpoints, 262-64
conditional compilation, 237-40
Conditional compilation attributes, 238, 239-40
conditional compilation symbols, 239
conditional expression in for loops, 140, 141
conditional methods, restrictions on, 240
conditional operator (?:), 102, 112
configuration files for applications, 249-51
configuration options for Visual Studio .NET, 19
configuration pages for source files, 21
Configuration Properties folder, Build property page, 239
Configuration Web Forms page, 658-59
connection. See also data connection
associating a Command object with, 580
closing, 575, 578-79
creating, 510
establishing to a data store, 572-79
Connection class, 569, 572
Connection Lifetime parameter of the ConnectionString property, 575
Connection objects
adding to Command objects, 579
constructing, 573
initiating transactions within the data store, 576
connection pooling, 574
connection properties, 511
Connection Reset parameter of the ConnectionString property, 576
connection string, changing for OleDbConnection objects, 645
Connection tab of the Data Link Properties dialog box, 592
ConnectionString property, 573, 575
console, sending trace and debug output to, 253
Console Application template, 23, 24
console applications, compared to Windows Forms applications, 305
Console class, WriteLine method of, 30, 128
const modifier, 47
constants, 45, 47
constructor initializer, 53
constructors, 45, 51-55
for the EventLogTraceListener class, 254-55
overloading, 51-52
for the StackTrace class, 242
types of, 51
contained objects, 220
containers, controls acting as, 367-69
containment, 325
Contains method
of the Queue class, 224
of the Stack class, 229
ContainsFocus property of the Control class, 386-87
content, validating for controls, 341-43
Content value for the BuildAction property, 385
Contents value in the StatusBarPanelAutoSize enumeration, 417
context, displaying menus according to, 401-2
context menus. See shortcut menus
ContextMenu class, 394, 411
ContextMenu control in Menu Designer, 411
ContextMenu property, 411
continue statement, 149, 151
Continue value in the DragAction enumeration, 562
contract
for the HTTP GET method, 695
for the HTTP POST method, 696-97
offered by a Web service, 693
for the SOAP method, 697
control
transferring out of exception handling blocks, 154-55
transferring with jump statements, 149-55
control captions, system-wide default color for, 330
Control class, 326, 386
control classes, 368, 656
Control property
of KeyEventArgs, 389
of the SystemBrush class, 445
of the SystemColors class, 440
of the SystemPens class, 459
control structure, breaking out of, 150
ControlContextMenu project, 411-13
ControlDark property
of the SystemBrush class, 445
of the SystemColors class, 440
of the SystemPens class, 459
ControlDarkDark property
of the SystemBrush class, 445
of the SystemColors class, 440
of the SystemPens class, 459
controlled statement in a for loop, 140, 141
ControlLight property
of the SystemBrush class, 445
of the SystemColors class, 440
of the SystemPens class, 459
ControlLightLight property
of the SystemBrush class, 445
of the SystemColors class, 440
of the SystemPens class, 459
controls, 326. See also individual controls
acting as containers, 367-69
adding to a Web Forms page, 646-47
anchoring, 504-6
associating shortcut menus with, 411
binding to a wide range of sources in Web Forms page, 669
creating event handlers for, 660-62
docking, 506-8
dragging onto a Web Forms page, 646-47
embedding, 368
hiding, 332
managing the appearance of, 329
managing the position and size of, 503-8
properties for, 320
respecting the default background and foreground colors, 330
scrolling with the ScrollBar classes, 366-67
switching focus to specific, 386
system-wide default color for, 330
techniques for adding to forms, 328
validating the contents of, 341-43
Controls collection
for each Web Forms page, 656
referencing child controls, 368
Controls example project, 365
ControlText property
of the SystemBrush class, 445
of the SystemColors class, 440
of the SystemPens class, 459
conversions, 75-76. See also type conversions
Convert class, 127
copy operation, 556, 557
Copy value in the DragDropEffects enumeration, 558
CopyTo method of the ICollection interface, 220
costs of creating threads, 285
Count method, 397
Count property of the ICollection interface, 220
Create Columns Automatically At Run Time check box, 678
Create schema option from the XML menu, 629
critical sections of code, 275-76
Cross mouse pointer value, 379
crosshair mouse pointer, 379
cryptographic key, 190
cryptographic key pair, 190-91
cryptographic service provider (CSP), 191
CrystalReportViewer control in Web server, 656
.cs extension, 700
.cs files, 303
CSP (cryptographic service provider), 191
.csproj file, 302
.csproj.user file, 302
CToolbar in Visual C++, 532
Ctrl+Alt+K, 14
CTRL+ENTER, 346
Ctrl+Shift+B, 29, 306
CTRL+TAB, 346
culture definitions, string comparisons using, 218
curly braces ({})
enclosing controlled statements, 134
enclosing unsafe code, 290
currency, displaying numeric types in, 129
current date, displaying, 496
CurrentThread property, 268
CurrentValue property of ItemCheckEventArgs, 362
Cursor class, 381-82
Cursor constructors, 383
Cursor property, 378-79, 381
Cursors class, 379
cursor-style iteration over a collection, 202
CursorSwap sample application, 383
custom attributes
controlling the usage of, 188-89
defining, 181-89
retrieving using reflection classes, 185
using multiple times, 189
custom authentication, 704
custom colors, retrieving the current set of, 443
custom format strings for the DateTimePicker control, 502
custom mouse pointers, 381-83
custom trace listeners, 255-61
Custom value
in the DashStyle enumeration, 464
in the DateTimePickerFormat enumeration, 501
in the LineCap enumeration, 463
CustomColors property of the ColorDialog class, 443
CustomFormat property for the DateTimePicker control, 501-3
customization of the Visual Studio .NET environment, 18-21
CustomValidator control for Web server validation, 655
CView class, 301
D
D format character for numeric types, 129
Dash value in the DashStyle enumeration, 464
dashboards, status bars serving as, 414
DashDot value in the DashStyle enumeration, 464
DashDotDot value in the DashStyle enumeration, 464
dashed lines, drawing with pens, 464-65
DashOffset property, 464
DashPattern property, 464, 465
DashStyle enumeration, 464
DashStyle property, 464
data
displaying, 510-14
entering directly into XML files, 630-31
loading into the data grid, 513-14
persisting, 572
reading from an XmlTextReader object, 607-9
retrieving from the clipboard, 552-53
retrieving using a DataReader object, 585-86
saving to the data store, 571
storing in multiple formats on the clipboard, 555-56
updating in the database, 589-90
verifying the integrity of, 119
Web server controls for displaying, 654-55
data access
disconnected for Web Forms pages, 669
multi-tiered, 670
in Web Forms, 669-70
data adapter, 511
Data Adapter Configuration Wizard, 511-12, 591-95
data binding in Web Forms pages, 669
Data Bindings dialog box, 676
data columns, displaying specific, 676
data command, directly executing a SQL statement, 672, 673
data components, binding to, 571-72
data connection, 592. See also connection
data formats, copying to the clipboard, 552
data grids
advanced, 517-20
binding the dataset to, 512-13
connecting to XML data, 517-18
customizing, 518-20
displaying hierarchical data in, 514-17
limiting the number of columns in, 512
linking multiple, 516-17
loading data into, 513-14
navigating, 516
updating databases with changes, 514
Data Link Properties dialog box, 592
Data namespace, 305
Data property of DragEventArgs, 558
data providers. See .NET data providers
data reader, 672-73
data rows, updating, 590
data stores, establishing a connection to, 572-79
data tables
filling from data stores, 588
mapping, 590-91
updating, 590
data types
CLS compliance of primitive, 36
from other namespaces, 63-64
DataAdapter class, 569, 586, 587-88
DataAdapter objects
constructing, 586-87
creating, 514
database connection. See connection
database data. See data
database server, executing commands directly on, 579
databases
binding to, 671
connecting to, 510, 573
propagating changes to, 682
updating data in, 589-90
updating with data grid changes, 514
working directly against, 672-73
DataBind method, 671, 677
data-binding expressions, 676
data-binding features, 670-71
DataBindings collection, 572
DataBinding_Simple Web Forms page, 670-71
DataColumn object in a DataTable object, 570
DataFormats class, 553-54
DataGrid control, 509-10, 677-82
displaying data, 655
displaying database data, 510-14
editing capability offered by, 678-79
editing the data displayed in, 679-82
putting a specific row into edit mode, 679-80
showing the contents of DataTable objects, 571-72
DataGrid Web Forms page, 677-79
DataGridColumnStyle class, 519
DataGridColumnStyle Collection Editor, 519, 520
DatagridDbconnSimple directory, 514
DataGridTableStyle Collection Editor, 519
DataGridTableStyle object, 519
DataKeys property of the DataGrid control, 681
DataList control, 655, 675-77
DataMember property of the DataGrid control, 512, 513, 572
DataObject class, 555
DataReader class, 569
DataReader object
reading data from SQL Server, 586
retrieving data, 585-86
returning a result set as, 584
DataRow object in a DataTable object, 570
DataSet constructor, 569-70
DataSet object, 512, 569
datasets, 512, 568, 569
accepting changes to, 571
adding rows to, 570
binding to data grids, 512-13
creating, 515
creating and using, 569-72
filling, 588-89
generating, 512
placing XML data into, 623-27
populating using a DataAdapter object, 586-95
storing, 673, 674
updating, 590
in Web Forms pages, 671-72
writing XML from, 627
XML with, 623-27
DataSource property
of a control, 671
of the DataGrid control, 512, 513, 572
DataTable object, 570
DataTableMappings collection, 590-91
dates
boldface rendering of special, 497
selecting, 494
DateTime values, 498
DateTimePicker control, 500-503
DateTimePickerFormat enumeration, 501
Day enumeration, 497
DbType property of the SqlParameter class, 583
DbType values, 582
DCOM (Distributed Component Object Model) objects, 684
Deactivated event, 387
Debug class, 245-48
debug compilation, 30
Debug configuration, 261
Debug Location toolbar, 264
debug messages, 254-55
DEBUG symbol
defining, 238-39
enabling output with the Debug class, 245
debugger, 261
debugging
examining the call stack, 264-65
support in ASP.NET, 638
decimal format, 129
decimal type, 34
DecimalPlaces property, 477
declaration of a field, 46
decrement (--) operator, 106-7, 273
deep copy of a current object, 221-22
default buttons for message boxes, 313
default clause in a switch statement, 138
default events, generating event handlers for, 338
default help filter, 12
default layout of Visual Studio .NET, 12
Default member of the CommandBehavior enumeration, 585
Default method, 217
default mouse pointer, 378, 379
default namespace, defining for a project, 25
default parameters, not supported by C#, 48
DefaultDesktopOnly value in the MessageBoxOptions enumeration, 314
DefaultTraceListener class
displaying assertion failures, 246-47
routing output messages to the Visual Studio Output window, 252
delegate chains, 168-69
Delegate class, 162
delegate invocation list, 169
delegate keyword, 161, 162
delegate methods, 169
delegate types, 161
delegates, 156, 159, 160-61
adding to a delegate chain, 166
as callback methods, 162-65
calling directly, 168
chaining together, 160-61
combining, 166-68
creating, 161-62
declaring, 161-62
exceptions thrown by multiple, 168
as functors, 165-66
with non-static methods, 170-73
removing from a delegate chain, 166-67
DeleteCommand property, 588
Delta property of the MouseEventArgs class, 373
dependency list in the manifest, 65
Depth Bit values in the ColorDepth enumeration, 483
Dequeue method, 224, 228
descendant classes, 40
descender, 470
Description property
for the WebMethod attribute, 693
of the WebMethod attribute, 687
descriptive label, creating for a form, 347
Desktop property
of the SystemBrush class, 445
of the SystemColors class, 440
destructors, 45, 55, 96
detailed method information, 243-44
details view of a ListView control, 531, 533
detents, rotated by a mouse wheel, 373
development environment
configuration options affecting, 19
of Visual Studio .NET, 12-13
Diagnostics namespace, 238, 241
dialog boxes
common, 300
forms as, 300-301
DialogResult enumeration, 309
DialogResult property
for a form, 333
for a push button control, 333
DialogResult return value, 308-9
DiamondAnchor value in the LineCap enumeration, 463
DictionaryEntry type, 233
dictionary-style collections, 223
DiffGram, writing XML files as, 627
digital certificates, 703-4
direct memory access operators, 113-14
Direction property of the Parameter object, 582
DirectionRightToLeft value in the StringFormatFlags enumeration, 431
DirectionVertical value in the StringFormatFlags enumeration, 431
directory, listing the contents of, 148-49
dirty data, detecting in a dataset, 571
disabled controls, 331-32
disabled text color, 332
DisabledLinkColor property, 348, 349
.disco extension, 691
disconnected access, 642, 669
disconnected model for ADO.NET, 568
discovery, identifying Web services, 691-93
Display Properties dialog box, 487
Display value in the GraphicsUnit enumeration, 472
DisplayFormatControl value in the StringFormatFlags enumeration, 431
DisplayKeys program, 388-89
DisplayStatus method, 228
Dispose method, 306, 578-79
calling on custom mouse pointers, 382-83
defined by IDisposable, 97-98
freeing resources with, 96-97
Dispose pattern, 384
Disposed event, 337
Distributed Component Object Model (DCOM) objects, 684
DIV elements, 651
DivideButton control, 648
DivideByZeroException exception, 107
Divider property for a toolbar, 544
division assignment (/=) operator, 111
division operator (/), 102, 106
DLL hell, 6
DLLs (dynamic-link libraries), 5-6
do loop, 134, 147-49
Dock property, 503
for a control, 506-8
in SimpleEdit, 404
docked child windows in Visual Studio .NET, 18
docking, 404, 414
DockStyle enumeration, 404, 506
Document Object Model. See DOM
document unit, 469
Document value in the GraphicsUnit enumeration, 472
documentation
generating for a project, 26-27
providing for Web services, 685-86
documentation comments, 3, 26-27
documentation start page, 27
DocumentElement property, 617, 618
Documents and Settings folder, 317-18
Documents page in the Environment category, 19
DOM (Document Object Model)
classes accessing, 615-16
sample application using, 619-23
saving a file from, 619
tree structure of, 614, 615
with XML, 613-23
with XML documents, 615-19
DomainUpDown class, 476, 478-79
DomainUpDown control, 478
dot operator (.), 114
accessing an enumeration value, 78
gaining access to members of a structure, 77
making access to members, 39
Dot value in the DashStyle enumeration, 464
double quotation marks, enclosing string literals, 91
double type, 35
DoubleClick event, 374, 375
raised by the Button class, 337
raised by the ListBox class, 358
double-precision floating-point type, 35
Downloads tab on the Visual Studio .NET Start Page, 11
drag and drop, 556-59
drag and drop operation, starting point for, 561
drag and drop sources, 560-63
drag and drop-related events, 557
DragAction enumeration, 562
DragDrop event for a control, 557, 558
DragDropEffects enumeration, 558
DragDropSample application, 561-63
DragEnter event for a control, 557, 558
DragEventArgs parameter, 558
DragLeave event for a control, 557, 558
DragOver event
for a control, 557, 558
firing, 560
implementing, 560
Drawing namespace, 305
DrawLine method, 432
DrawLines method, 433
DrawRectangle method, 433-34
DrawRectangles method, 433, 434
DrawString method, 428-30
drill-down capability in a data grid, 516
Drop value in the DragAction enumeration, 562
DropDown event, 366
DropDown value in the ComboBoxStyle enumeration, 364
DropDownButton value in the ToolBarButtonStyle enumeration, 548
DropDownList control, 654
DropDownList value in the ComboBoxStyle enumeration, 364
DropDownStyle property, 364
DropDownWidth property, 364
DroppedDown property, 365
dynamic discovery, 691-92
Dynamic Help page, 20
dynamic help system in Visual Studio .NET, 21
Dynamic Help window, 3, 21
dynamic trees, 523
dynamic TreeView controls, 523-28
dynamic-link libraries. See DLLs
E
E format character, 129
edit buttons, adding to a DataGrid control, 679
Edit links in the edit mode of a DataGrid control, 679
Edit Relation dialog box, 515
EditCommand event, 679
EditCommand handler, 680
EditItemIndex property of a DataGrid control, 679, 680
editor, creating a simple, 402
Effect property of the DragEventArgs parameter, 558, 559
elements, creating for an XML file, 600-601
ellipsis (...) after popup menu items, 391
else statement, 135
else-if statement, 135
em size, 469
embedded classes, 59
embedded resources, 530
EmbeddedResource value for the BuildAction property, 385
empty conditional expression, 141
Empty Project template, 23
Empty Web Project template, 24
Enabled property
for controls, 331-32
in the Menu Designer Properties window, 394
of the MenuItem class, 401
EnableSession property of the WebMethod attribute, 687
encoding parameter in XmlTextWriter, 599
End property, exposed by the SelectionRange class, 495
EndCap property from the Pen class, 462
endpoints, defining in DrawLine methods, 432
#endregion preprocessor directive, 305
EndUpdate method
adding tree nodes to a TreeView control, 525
redrawing the list box, 354
Enlist parameter of the ConnectionString property, 576
Enqueue method
of the Queue class, 224
in the SkiLiftQueue application, 228
Enter event, 387
ENTER key, default behavior for, 341, 346
Enter method of the Monitor class, 276, 277
entry point for an application, 28
enum keyword, 78
enum type name, 78
enumerated types, 60
enumeration, 194
enumeration classes, 202
enumeration interfaces, 202-7
enumeration objects, 202, 203
enumerations, 34, 78
enumerator class, 204-6
enumerator interfaces, 207-8
enumerators, 201
assigning sequential values, 78
embedding, 204
implementing as a class embedded in a collection class, 204
implementing as classes, 204-6
invalidating, 203, 204, 207
providing access to, 206-7
en-US culture, 218
Environment category in the Options dialog box, 19-20
equality, delegate and event handler view of, 340
equality (==) operator, 92, 103
Equals method, 118, 121
error codes, returning, 68
Error member of the TraceLevel enumeration, 250, 251
Error value in the MessageBoxIcon enumeration, 312
errors, managing with exceptions, 67-73
ESC key, 341
EscapePressed property, 562
event classes, synchronizing with, 279-80
event fields, 175
event handler methods, 338
event handlers
adding and removing, 175
adding for the ApplicationExit event, 319-20
adding new, 337-40
adding to buttons, 648-49
creating a single for multiple buttons, 661, 667
creating for any event, 338-40
creating for controls, 660-62
for multiple controls, 339-40
providing, 160
removing, 340
wiring, 338
event handling, 336-37
event handling delegates, 174
Event icon in the Properties window, 338
event keyword, 175
event log. See Windows event log
event wireup code, 652-53
EventArgs class, subclassing, 174
event-based synchronization, 279
event-driven model of ASP.NET, 637-38
EventLog objects, 254
EventLogTraceListener class, 252, 254-55
events, 45, 173, 336
compiler restrictions on, 173-74
examples using, 176-79
handled by MouseEvents, 377
handled by the ComboBox class, 365-66
handling, 173-79
handling for menu items, 399-400
handling from the checked list box, 362-63
handling from the keyboard, 389-90
raising, 175-76
related to input focus, 387
routing to an existing handler, 340
exception classes, 73
exception handlers, 71-72
exception handling, 67
exception handling blocks, 154-55
exception objects, 71
exceptions, 33
catching specific, 69
clustering into categories, 73
handling, 68-73
managing errors with, 67-73
reserving the use of, 153
retrieving descriptions of, 70-71
returning to another exception handler, 69-70
throwing, 153
exclamation mark (!) after top-level menu items, 391
Exclamation value in the MessageBoxIcon enumeration, 312
ExecutablePath property, 317
ExecuteNonQuery method, 584
ExecuteReader method, 584-85
ExecuteScalar method, 584
ExecuteXMLReader method, 585
Exit method
of the Application class, 319
of the Monitor class, 276, 277
ExitThread method, 319
ExpandAll method, 522
expanded Color common dialog box, 442
explicit casting, 74
explicit conversions, 126-27, 128
explicit operators, 131
exponential form, 129
extensibility of data grids, 517
Extensible Markup Language. See XML
external assemblies, 7
external mouse pointer files, 384-85
F
F format character for numeric types, 129
f(x) notation, 115
F5
launching a debugging session, 261
launching Windows Forms projects in the debugger, 306
F7 viewing source code in Forms Designer, 303
F9
adding breakpoints, 265
setting a breakpoint, 261
F10, stepping to the next instruction, 261
F11, stepping into the current instruction, 261
Fail method, 245, 247
failure messages, 247
falling through case labels, 138-39
false operator, 104, 105, 123
defining for the BattingAverage value type, 124
testing an operand, 125
Far value in the StringAlignment enumeration, 432
Favorites window. See Internet Explorer Favorites window in Visual Studio .NET; Visual Studio .NET Favorites window
feedback
providing with status bars, 414-22
providing with the mouse pointer, 378-85
Fibonacci sequence, 287
fields, 45, 46-47
from the DataFormats class, 553-54
declaring, 46
detecting attributes attached to, 186-87
marking as readonly, 46-47
providing user access via properties, 130-31
File menu, New Project option, 22
file streams, 253-54
FileDrop operation in Windows Explorer, 559, 560
FileDropTarget application, 559-60
files
created by Visual C# .NET, 302-6
created for projects and solutions, 25
loading a RichTextBox control from a, 486
saving from the DOM, 619
Fill method, 513, 588-89
Fill value in the DockStyle enumeration, 404, 506
FillRectangle method, 434, 435
FillRectangles method, 434, 435
FillToRight value in the TabSizeMode enumeration, 494
finalization, 96
finalization queue, 96
Finalize protected method, 95
finalizers, 95-97
finally block, 154-55, 277
finally clause
calling Dispose or Close, 97
in a try-catch block, 72-73
Finish button in the Data Adapter Configuration Wizard, 594-95
FirstDayOfWeek property, 497
first-in, first-out data structure, 224
FitBlackBox value in the StringFormatFlags enumeration, 431
fixed statement, 292-93
Fixed value in the TabSizeMode enumeration, 494
Fixed3D value
in the BorderStyle enumeration, 347
in the FormBorderStyle enumeration, 321
FixedDialog value in the FormBorderStyle enumeration, 321
fixed-pitch fonts. See monospace fonts
fixed-point form, 129
FixedSingle value
in the BorderStyle enumeration, 347
in the FormBorderStyle enumeration, 321
FixedToolWindow value in the FormBorderStyle enumeration, 321
FIXME comment token, 20
Flat appearance for a toolbar, 546, 547
flat toolbar with text and a divider line, 547, 548
Flat value
in the FlatStyle enumeration, 329
in the LineCap enumeration, 463
FlatButtons value in the TabAppearance enumeration, 492
FlatStyle enumeration, 329
FlatStyle property of the Button class, 329-30
float coordinates, 425
float parameters, 434
float type, 35
floating-point values, 429
Flow Layout mode, 651
flow of execution, 133-56
Flush method, 245
Focus method, 386
Focused property of the Control class, 386, 387
Font class, 465
Font constructor, 470-73
font families, 466
font metrics, 469-73
FontCollection base class, 468
FontDialog class, 485
FontFamily class, 466, 469-70
FontFamily objects, 466
FontFamily property, 473
fonts, 465
creating programmatically, 470-73
properties exposed by, 473
Fonts and Colors page in the Environment category, 20
FontStyle enumeration, 466
FontStyle values, 470-71
For Each loop in Visual Basic, 143
for loop, 133, 140-43
algorithm for, 141
components of, 140
typical use of, 142
foreach expression, 50
foreach loop, 134, 143-45
algorithm for, 143
iterating over a collection, 208
visiting each element in an array, 145
foreach statement
iterating over an invocation list, 169
iterating over array elements, 89
iterating over objects in Hashtable, 232-33
simplifying iteration over a jagged array, 91
ForeColor property
of the Button class, 329, 330
of the MonthCalendar control, 499
of the RichTextBox control, 484
foreground threads, 273
Form class, 299, 300
derived indirectly from ScrollableControl, 367
menu events raised by, 400
properties available in, 321-23
Form element, 650
form properties, 320
Format property, 501
FormatFlags property, 431
formats for textual data, 554
formatting characters
case of, 130
for numeric types, 129-30
Formatting property of the XmlTextWriter object, 602
FormBorderStyle enumeration, 321
FormBorderStyle property, 321
FormClosing method, 316
forms
adding to projects, 307
as containers for child controls, 367-69
as dialog boxes, 300-301
disabling entire, 332
displaying to users, 308
hiding, 332
passing values to, 309-10
properties for, 320
setting border styles for, 320-21
setting the DialogResult property for, 333
specifying the background color for, 321, 323
specifying the caption for, 322, 323
specifying the dimensions of, 322
using a main menu with, 391
as views, 301
Forms Designer. See Visual C# Forms Designer; Web Forms Designer; Windows Forms Designer
Forms namespace, 305
FormStartPosition enumeration, 322
ForwardDiagonal value in the LinearGradientMode enumeration, 455
four-way sizing mouse pointer, 381
fragile base class problem, 57
FrameCount property, 241
framework, 4
friend keyword from C++, 61
FromArgb method, 438, 439
FromKnownColor method, 439, 441
FromName method, 439
FrontSystemColor method, 446
full evaluation operators, 105
FullOpen property, 442
FullPath property, 528
function keys, used in debugging, 261
function pointers, compared to delegates, 160
functions, encapsulating into callable function objects, 160
functors, delegates as, 165-66
G
G format character for numeric types, 129
G property, exposed by the Color structure, 439
gacutil.exe, 9, 191-92
garbage collection, 39, 55, 93-94
garbage collection pass
initiating, 95
initiating with the Collect method, 99
garbage collector, 93
GC.SuppressFinalize, 96, 98
GDI+ (Graphical Device Interface), 423
accessing drawing functions, 305
drawing text with, 428-32
general format for numeric types, 129
General page
in the Environment category, 19
in the Text Editor category, 20-21
general-purpose mouse pointer values, 379
generational garbage collector, 94
generations, specifying for garbage collection, 94, 99
GenericFontFamilies enumeration, 466-67
GenericMonospace property, 467
GenericSansSerif property, 467
GenericSerif property, 467
get accessor in indexer declarations, 195
Get Started tab on the Visual Studio .NET Start Page, 10
GetCellAscent method, 469
GetCellDescent method, 470
GetChanges method, 571
GetData method, 552
GetDataObject method, 552-53
GetEmHeight method, 470
GetEnumerator method, 202, 206
GetFileLineNumber method, 242
GetFileName method, 242
GetFormats method, 555
GetFrame method, 241
GetGeneration method, 99-100
GetHashCode method, 118
of a key, 232
overloading, 121
GetInvocationList method, 168
GetItemChecked property, 361
GetItemCheckState property, 361-62
GetLength method, 90
GetLineSpacing method, 470
GetLogicalDrives method, 535
GetMember method, 187
GetMethod method, 242, 243
GetNextAction method, 228
GetSqlInt32 method, 586
GetSqlString method, 586
GetStackTrace method, 243
GetStackTraceWithMethods method, 243-44
GetTotalMemory method, 99-100
GetType method, 45, 184
GiveFeedback event for a control, 557
global assembly cache, 8-9, 190
deploying assemblies into, 191-92
selecting assemblies from, 65
Global Assembly Cache Utility tool, 9, 191-92
global functions, 28
global methods, 28
global namespace, 61
Global.asax file in a Web service, 688
GotFocus event, 337, 387
goto statement, 139, 149, 152
gradient transition, 454-55
gradients, 453-55
Graphical Device Interface (GDI). See GDI+
Graphics class, 427-37
Graphics property, 428
GraphicsPath class, 456
GraphicsUnit enumeration, 471-72
GraphicsUnit parameter, 471
GrayText property
of the SystemColors class, 440
of the SystemPens class, 459
greater than (>) operator, 103, 104
greater than or equal to (>=) operator, 103, 104
green arrow, indicating a control, 647
grid controls, 510
grid vs. Flow Layout mode, 651
GroupBox class, 368, 369
growth factor for the Queue object, 225
guidelines for Windows applications, 317
H
HACK token, 14
Hand mouse pointer value, 379
Hand value in the MessageBoxIcon enumeration, 312
Handled property
of KeyEventArgs, 389
of KeyPressEventArgs, 390
handlers. See event handlers
handles, waiting for, 288-89
handling exceptions, 68-73
harmless conversions, 126
HAS-A relationships, 43-44
HasChanges method, 571
hash, 119
hash buckets, 231, 232
hash functions, 118, 119
Hashtable class, 231-33
accessing objects in, 222-23
compared to ListDictionary, 234-35
interfaces implemented by, 232-33
Hashtable field in the StringDictionary class, 235
Hashtable load factor, 232
Hashtable object, 231
Hashtable structure, 231
hatch brushes, 450-52, 461
HatchBrush class, 444, 450
HatchBrush objects, 450-51
HatchFill value in the PenType enumeration, 464
HatchSelection application, 451-52
Headlines tab on the Visual Studio .NET Start Page, 10
heap-allocated object, 81
Height property
of a font, 473
setting for a combo box, 365
of the Size structure, 425
HelloWorld project, 24, 25, 30
help filter, defining a default, 12
Help menu
Index option, 21
Search option, 21
Help mouse pointer value, 379
Help page in the Environment category, 20
Help system in Visual Studio .NET, 21
HelpLink exception object, 71
hexadecimal format, 129
hidden controls, 332
hidden forms, 332
Hide method, 308, 332
hierarchical data, displaying in data grids, 514-17
hierarchical information, displaying in a TreeView control, 520-31
Highest priority for a thread, 272
Highlight property
of the SystemBrush class, 445
of the SystemColors class, 440
of the SystemPens class, 459
HighlightText property
of the SystemBrush class, 445
of the SystemColors class, 440
of the SystemPens class, 459
horizontal scroll bar, 345. See also scroll bars
horizontal splitter, mouse pointer indicating, 379
Horizontal value in the LinearGradientMode enumeration, 455
HorizontalAlignment enumeration, 416
HotTrack property
of the SystemBrush class, 446
of the SystemColors class, 441
hourglass mouse pointer, 378, 379
HoverUnderline value from the LinkBehavior enumeration, 350
HScrollBar class, 366
HSplit mouse pointer value, 379
HTML file, compared to an .aspx file, 650-51
HTML labels, declared as DIV elements, 651
HTML pages, generating documentation as, 26
HTML server controls, 662
HTML text, adding static, 647-48
HTTP GET protocol, 695-96
HTTP POST protocol, 696-97
HyperLink control, 654
I
I-beam mouse pointer, 378
IBeam mouse pointer value, 379
ICloneable interface, 220-22
ICollection interface, 219-20, 282
IComparable interface, 211, 212-14
IComparer interface, 211, 214-17
icon images, 531-32
Icon object, referencing for an ImageList control, 482
icons, adding to message boxes, 312-13
ID attributes of elements in Web Forms controls, 651
IDataObject interface, 555
IDataObject methods, 552
identity of a strong-named assembly, 9
IDeserializationCallback interface, 232
IDictionary interface, 197, 222-23, 234
IDictionaryEnumerator interface, 220, 223
IDisposable interface, 98-99
implementing, 97-98, 278-79
Idle event in the Application class, 318
IEnumerable interface, 194, 202, 220
implemented by StringDictionary, 236
implementing, 207
IEnumerator interface, 194, 202
implementing, 203
iterating over a collection, 207-8
if statement, 133, 134-37
IIS (Internet Information Services)
accessing, 636
configuring to authenticate Web service users, 702-3
IL (intermediate language), 6
IList interface, 223-24, 234
Image Collection Editor, 524-25, 542, 543
Image control for a standard user interface, 654
Image objects, 447
Image property
exposed by the PictureBox class, 481
exposed by the TextureBrush class, 449
image strip, 531-32
ImageButton control for a standard user interface, 654
ImageCollection object, 482
ImageIndex property, 533, 534
ImageList control, 481-83
adding bitmaps for buttons, 549
adding images for toolbar buttons, 542
adding to create a toolbar, 542
creating an instance of, 481-82
ImageList object, 524-25
ImageList properties, 531
images
adding to an ImageList control, 482
defining as embedded resources, 530
displaying in a PictureBox control, 481
removing from an ImageList control, 483
storing for other Windows Forms controls, 481
for toolbars, 542
Images property, 482
ImageSize property, 483
immutability, 92
implicit boxing operation, 84
implicit conversions, 125-26, 127
for Boolean tests, 135
defining, 128
from scalar to Boolean types, 105
implicit operators, 131
InactiveBorder property
of the SystemBrush class, 446
of the SystemColors class, 441
InactiveCaption property
of the SystemBrush class, 446
of the SystemColors class, 441
InactiveCaptionText property
of the SystemColors class, 441
of the SystemPens class, 459
Inch value in the GraphicsUnit enumeration, 472
#include directives, 38
IncreaseCapacity method, 200
Increment method, 480
increment (++) operator, 102, 106-7, 273
Increment property, 477
indentation in nested if and else statements, 135-36
Indentation property of the XmlTextWriter object, 603
IndentChar property of the XmlTextWriter object, 602-3
indeterminate state for a check box control, 335, 336
index brackets
in an array declaration, 86
declaring jagged arrays with multiple, 90-91
index keys, 119
index operator ([]), 114, 117
Index property of ItemCheckEventArgs, 362
indexers, 45, 194-95
declaring, 195-97
declaring as interface members, 197-98
example of, 198-201
keys as, 233
overloading, 196
providing multidimensional, 196-97
providing multiple for a class, 196
indexes
retrieving for selected items, 355
specifying for menu items, 397
indices, removing in reverse order, 357
inequality (!=) operator, 103
infinite loop, 141
Info member of the TraceLevel enumeration, 250, 251
Info property
of the SystemBrush class, 446
of the SystemColors class, 441
information, displaying in message boxes, 311-15
Information value in the MessageBoxIcon enumeration, 312
InfoText property
of the SystemColors class, 441
of the SystemPens class, 459
inheritance, 39-41
methods and, 55-58
multiple levels of, 41
vs. ownership, 43-44
structures and, 76
Inherited parameter of the AttributeUsage attribute, 188, 189
initialization expression in for loops, 140, 141
InitializeComponent method, 652
of a form, 338
in a form's code, 521
InitializeComponents method, 368
InnerException exception object, 71
InnerXml property, 618
input focus, 386-87
input methods, 371
Insert method, 352
InsertCommand property, 588
insertion point, 379
InstalledFontCollection class, 468-69
instance constructors, 51
compared to static constructors, 54
invoking, 51
instance fields, 53
int base type, 78
int type, 35
IntelliMouse Explorer mouse, extra buttons on, 374
IntelliSense, warning about ambiguous type names, 64
interface conventions for menus, 391
interface declaration, 197
interface members, declaring indexers as, 197-98
interfaces, 33, 66-67
classes and, 67
implemented by the Hashtable class, 232-33
marking as unsafe, 291
intermediate language (IL), 6
internal accessibility
for a class, 61
for a class member, 58
defining for top-level types, 59-60
internal array for the Queue object, 225
International Settings page in the Environment category, 20
Internet Explorer, programming using client script, 640
Internet Explorer Favorites window in Visual Studio .NET, 17
Internet Protocol security, 704
interpreted languages, 637
interprocess resource synchronization, 278
Interrupt method of a thread, 271
IntPtr parameters in a Cursor constructor, 383
invalidated enumerators, 203
InvalidCastException exception, 114
caused by an unboxing attempt, 85
raising, 74-75
InvalidOperationException exception, 203, 225
invocation of static constructors, 55
Invoke method, Op delegate calling directly inside, 168
IP Address And Domain Name Restrictions area, 704
is operator, 113
IS-A relationships, 43
IsBackground property of a thread, 273
IsEmpty property, 424, 426
ISerializable interface, 232
IsKnownColor property, 439
IsNamedColor property, 439
IsolationLevel enumeration, 577
IsPostBack property, 665
IsStyleAvailable method, 467-68
IsSynchronized property, 220, 282
IsSystemColor property, 439
Italic property of a font, 473
item selection and activation in a ListView control, 536-37
Item Templates boxes, dragging controls into, 675-76
ItemActivate event, 537
ItemActivation enumeration, 537
ItemCheck event, 362-63
ItemCheckEventArgs object, 362
ItemDrag event, 526
items
adding to a TreeView control, 525
adding to list boxes, 351-53
checking in a checked list box, 361-62
interacting with selected in a list box, 354-58
removing from a list box, 353-54
retrieving a reference to selected, 356
retrieving the index of the currently selected, 355
selecting programmatically, 357-58
Items collection of a ListView control, 534
Items property of the ObjectCollection class, 351
iteration expression in a for loop, 140, 141
iteration interface over contained objects, 220
iteration over an associative array collection, 201
iteration statements, 140-49
Next
Last Updated: April 23, 2002
|