|
|
 |

 |
|
Programming Microsoft® Visual Basic® .NET (Core Reference)
|
|
|
Author
|
|
Francesco Balena (Wintellect)
|
|
|
Pages
|
1616
|
|
Disk
|
1 Companion CD(s)
|
|
Level
|
All Levels
|
|
Published
|
04/17/2002
|
|
ISBN
|
9780735613751
|
|
Price
|
$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
& (ampersand), 350
&= (ampersand equals), 105
<> (angle brackets), 318
* (asterisk), 23, 588
*= (asterisk equals), 105
@ (at symbol), 94
\ (backslash), 102
\= (backslash equals), 105
<%# %> (binding expression delimiters), 1263-64
^ (caret), 102
^= (caret equals), 105
: (colon), 129
{} (curly braces), 25, 112-13, 361
"" (double quotation mark), 146
= (equals), 104
> (greater than), 64
() (parentheses), 120, 121, 178, 217
+ (plus sign), 872
+= (plus equals), 105
? (question mark). See question mark (?)
; (semicolon), 25
/= (slash equals), 105
[ ] (square brackets), 381, 484, 633, 845
_ (underscore), 176, 318
2-D vector graphics. See vector graphics
A
abstract classes, 261-63
AcceptChanges method, 1097
accessibility. See scope
access permissions, 40
Account property, 988
accounts, user
ASPNET, 1209, 1386, 1388
IUSR_machinename, 1384-86, 1388
LocalSystem, 974
Windows services and, 988
action queries, 1045-46
activating SOAP extension
from configuration file, 1520-21
with custom attribute, 1521-22
Activator class, 660-61
Active Server Pages. See ASP
ActiveX Control Importer (Aximp) tool, 709-10
ActiveX controls, 7, 709-10
Adapter method, 405, 412
AddHandler command
arguments, 121
closing forms, 722
control events, 729-30
extender provider controls, 866
module events, 221-22
mouse events, 703-4
shared events, 234-35
trapping events from arrays with, 222-23
trapping events with, 217-20
AddressOf operator, 304-5, 306-7
ADepends utility, 570
ADO (ActiveX Data Objects)
ADO.NET vs., 19, 45, 997-1000, 1047. See also ADO.NET applications
COM Interoperability and, 1004-5
database independence, 1009-10
limits of, 998-99
ADO Extensions for DDL and Security (ADOX) library, 1004-5
ADO.NET applications
ADO via COM Interoperability, 1004-5
ADO vs., 19, 45, 997-1000
Command objects, 1006. See also Command objects
connected mode vs. disconnected mode, 1006, 1007, 1047
Connection objects, 1006. See also Connection objects
DataAdapter objects, 1007. See also DataAdapter objects
Data And XML layer and, 19
database independence, 1008-10
data binding, 829-35. See also data binding, Web Forms con.trol
DataReader objects, 1006, 1038-46
DataSet objects, 1007. See also DataSet objects
Framework Class Library and, 45-46
limits of ADO, 998-99
major changes from ADO, 999-1000
namespaces, 1007-8
.NET Framework data providers, 1002-5
object model, 1006-10
objects, 1006-7
retrieving data, 1000-1001
transition from ADO to, 997-1010
XML features, 1001-2. See also DataSet objects, XML fea.tures of
AdRotator control, 1261-62
AL (Assembly Linker), 24, 35-36, 568, 575, 606-9, 618
aliases
ASP.NET configuration file settings, 1411-12
command, 64
namespace, 83
Web Forms, 1220-21
alignment
Pen, 891
text, 692, 921-22
allocated data store slots, 524
alpha blending, 902. See also transparency effects
alternating constructs, regular expression, 485
Alt key selection, 55
ambiguous overloaded methods, 183-84
ampersand (&), 350
ampersand equals (&=), 105
anchored controls, 697-700
AndAlso operator, 126-28
And operator, 127, 128
angle brackets (<>), 318
anonymous access, 1382, 1384, 1386
ANSI strings, 130
anti-aliasing, 924-26
AppDomain class, 39-40, 619-30
assemblies and, 39-40. See also assemblies
Cache objects, 1352
catching unhandled exceptions, 625-28
creating, 623-25
LoaderOptimization attribute, 629-30
properties, methods, and events, 619-23
application.config files, 578-80, 595, 765-66
ApplicationException class, 140, 145, 152-53
Application log, 966-68, 991. See also EventLog component
Application objects, 773-78
Global.asax file and event handlers, 1360. See also Glo.bal.asax file
global error handlers and, 776-78
properties, methods, and events, 773-76
Visual Studio .NET debugger and, 778
XML Web service access, 1495-96
applications
ADO.NET. See ADO.NET applications
application-level tracing, 1369-70
Application objects, 773-78. See also Application objects
application-wide response filter, 1364
ASP, 6-8
ASP.NET. See ASP.NET applications; Web Forms applica.tions; XML Web services
client. See client applications
compiling. See compilation; compilers
components, 35. See also components
configuration files and versioning policies, 578-80
console, 35. See also console applications
debugging, 32, 157-71. See also debugging
domains. See AppDomain class
legacy, 46-47, 928
log, 966-68, 991
processes and. See also processes
registering, as event sources, 971-72
running, and JIT compiler, 30-32
running and testing localized, 761-62
state management variables, 1341
tracing, 163-71, 1368-71
types of, 35
Win32. See controls, Windows Forms; GDI+; Win32 objects; Windows Forms applications; Windows service applications
application variables, 1341, 1352
architecture, .NET Framework, 17-20
arcs, 887-89
ArgumentException class, 150, 153-54
arguments
arrays as, 122-23
attribute, 319, 324-25
boxing and, 108
ByVal and ByRef, 121
calling procedures and, 119-21
code verification and, 38
coercion and, 182-83
Command, 1032-38, 1118-22
command-line, 137
constructors and, 190-92
default member, 104-5
dialog box and command, 63
DllImport, 324-25
enumerating, 655-56
event, 223-24, 688
fields as, 177-78
Implements, 283-84
Locals window and, 65
methods and, 179
optional, 26, 123-24, 181-82
ParamArray, 124-25
parentheses and, 121
procedure, 119-26. See also procedures
properties as, 185
properties with, 187-89
returning values, 125-26
sharing data among threads without. See sharing data among threads
Windows service, 992-93
arithmetic functions, 132-33
Array class, 385-87
ArrayList class, 402-5, 410
arrays, 111-15, 385-96. See also collections
Array class and creating, 385-87
ArrayList objects vs., 403
of arrays, 395-96
Boolean, 93
clearing, copying, and moving elements, 391-93
control, 728
copying, 113-15, 388
creating nonzero-based, 387-88
data binding to, of objects, 823-29
as fields, 177
initializers, 112-13
passing, as procedure arguments, 122-23
of procedure arguments, 124-25
as public members of classes, 115
ReDim statement, 111-12
as reference types, 106, 341
as return values, 125
searching values, 393-95
sorting elements, 389-91
trapping events from, 222-23
As clause, 90
.ascx files, 1317, 1425
.asmx files, 1473, 1475, 1487-88. See also XML Web services
ASP (Active Server Pages)
ASP.NET vs., 14. See also ASP.NET applications
objects of, as properties of ASP.NET Page class, 1324-25
problems of, 6-8
state management techniques, 1340-42
Web Forms as successor to, 13-15. See also Web Forms applications
ASP.NET applications, 1323-1423
ASP vs. 14
caching. See caching
configuration files and, 1323-24. See also configuration files, ASP.NET
DataSet objects and, 1048
GDI+ and, 46
Global.asax file, 1360-68
HttpApplicationState class, 1339-40
HTTP modules and handlers, 1372-81
HttpRequest class, 1325-29
HttpResponse class, 1329-37
HttpServerUtility class, 1337-38
HttpSessionState class, 1338-39
intrinsic objects, 1324-40
.NET Framework layer, 19
.NET runtime support, 883
Page object properties and, 1324-25
performance counters, 1421-23
projects, 51
security. See security, ASP.NET
session state management. See session state management
technologies, 13, 1195
tracing, 1369-71
Web Forms as ASP successor, 13-15. See also Web Forms applications
Web Services as Internet of the future, 15-16. See also XML Web services
ASP.NET Applications performance counter, 1421, 1422-23
aspnet_isapi.dll, 1196, 1387
ASP.NET log, 585
ASP.NET performance counter, 1421-22
ASP.NET_SessionId cookie, 1508-9
aspnet_state service, 1344-45
ASPNET user account, 1209, 1386, 1388
ASP.NET Web Application projects, 51
ASP.NET Web Service projects, 51
aspnet_wp working process, 1359, 1387-88, 1417-20
.aspx pages, 1195-96, 1427. See also pages, Web Forms
assembler, MSIL, 29-30. See also Microsoft Intermediate Lan.guage
assemblies, 35-41, 563-618
ActiveX controls and, 709-10
ADepends utility, 570
AppDomains and, 39-40, 619-30. See also AppDomain class
applications and, 35
binding process. See assembly binding
code verification and, 38-39
command-line tools. See assembly command-line tools
configuration files, 595-601. See also configuration files
custom attributes, 617-18
domain neutral, 40
Framework Class Library, 19-20
manifests, 569-70
metadata and manifests, 36-38
modules and, 563-68. See also modules
.NET Framework and, 10
partial signing and key containers, 576-77
private and shared, 570-74
security and, 40-41
sharing, among AppDomains, 629-30
single-file and multiple-file, 35-36, 568-69
strong names, 574-76
Visual Studio .NET and multiple-file, 36
assembly binding, 577-95
Assembly Binding Log Viewer utility, 585-86
Assembly class, 632-35
AssemblyName class, 635-37
codebase hints, 581-82, 594-95
configuration files and, 590-91
creating sample client application, 586-89
culture qualifiers and, 591-92
example, 586-95
installation in GAC, 595
previously loaded assemblies and GAC searches, 581
probing, 582-85
probing subdirectories, 589-90
reflection and, 633-37. See also reflection
signing assemblies with strong names, 592-94
steps of, 577-78
version policy in application configuration files, 578-80
Visual Studio .NET and references to DLLs in other direc.tories, 587
<assemblyBinding> configuration file section, 579-80
Assembly Binding Log Viewer (FUSLOGVW), 585-86
Assembly class, 633-35
assembly command-line tools, 601-17
Assembly Linker (AL), 606-9. See also AL
Global Assembly Cache Utility (GACUTIL), 611-12
MSIL Disassembler (ILDASM), 612-15
Native Image Generator (NGEN), 615-17
Strong Name (SN) utility, 610-11
Visual Basic Compiler (VBC), 602-6. See also VBC
AssemblyDelaySign attribute, 576
@Assembly directive, 1220
.assembly extern statements, 29
AssemblyInfo.vb file, 617-18, 1196
AssemblyKeyFile attribute, 575, 576
Assembly Linker. See AL
AssemblyName class, 635-37
AssemblyVersion attribute, 588
Assert method, 165-66
assignments, structure, 117-18
assignments, variable, 100-11
arrays, 113
constants and Enums, 110-11
CType function, 108-9
derived classes and, 241-42
DirectCast operator, 109-10
interfaces and, 284
object values, 102-5
Option Strict statements, 100-102
shorthand for common operations, 105
True value and, 94
value types and reference types, 105-8
asterisk (*), 23, 588
asterisk equals (*=), 105
AsyncCallback objects, 555
asynchronous operations, 551-61
callback procedures, 555-57
calls, 553-55
delegates, 552-58
file operations, 559-61
method invocation, 557-58
opening databases, 1017-18
XML Web service method calls, 1506-7
Atan2 function, 133
atomicity, 532
atomic zero-width assertions, regular expression, 485
at symbol (@), 94
Attribute class, 329, 334
attributes, 317-34
adding, to custom controls, 845-48
assembly custom, 617-18
Attribute class, 329, 334
custom, 329-34
discovering, at run time, 331-34
file, 423
rendering style, 1452-53
retrieving Type, 640-43
syntax for, 318-19
uses for, 317-18
Visual Basic .NET, 319-28
XML serialization, 462-66
AttributeTarget argument, 330
AttributeUsage attribute, 329-30
audit events, 967
authentication
ASP.NET configuration, 1410-11
ASP.NET forms, 1395-1402
ASP.NET modes, 1391-92
ASP.NET Windows, 1392-94
authorization vs., 1381-82. See also authorization
basic, 1384-85
custom, 1515-19
digest, 1385
IIS, 1384-86
Windows, 1385, 1386-87, 1514-15
XML Web service, 1495
<authentication> configuration file section, 1410-11
Authenticode signatures, 575
authorization
ASP.NET configuration, 1411
authentication vs., 1381-82. See also authentication
IIS, 1382-83
<authorization> configuration file section, 1411
autoflush attribute, 166
auto-instancing object variables, 99-100
AutoPostBack property, 1207-11, 1456-59
AutoResetEvent class, 543-46
Autos window, 65, 161-62
AxHost class, 710
Aximp (ActiveX Control Importer) tool, 709-10
B
backing up registry, 932
backreference constructs, regular expression, 485
backslash (\), 102
backslash equals (\=), 105
Base64-encoded strings, 370-71
base classes. See also inheritance
calling constructors of, 250-51
calling Finalize Dispose methods of, 251, 286
control scope, 749
derived classes and, 237. See also derived classes
MyBase keyword, 248-49
MyClass keyword, 252-55
overriding members. See overriding
Base Class Library (BCL), 18
.bas files, 73
basic authentication, 1384-85
BCL (Base Class Library), 18
BeginInvoke method, 553-58, 859, 1504
BeginRead and BeginWrite methods, 559-61
BeginUpdate method, 811
Bézier splines, 889-90
bidirectional data binding. See two-way data binding
Binary Compatibility, 5
binary files, reading and writing, 434-35
BinaryFormatter objects, 442
BinaryReader and BinaryWriter classes, 430, 434-35
BinarySearch method, 394-95
binary serialization, 442-43
binding. See also early binding; late binding
ASP.NET, 14
assembly. See assembly binding
data. See data binding
Option Strict and, 101-2
polymorphic code and, 238-39
script languages and, 7
Visual Basic .NET method calls, 26
XML Web service method calls and early, 1504
BindingContext objects, 823-24
BindingManagerBase objects, 823-24
Binding objects, 823-24. See also data binding
<bindingRedirect> configuration file section, 580
bin directory, 587, 989
binpath, 582-83, 590-91
BitArray class, 398-99
bit-coded Enum values, 382-83
BitConverter class, 439
Bitmap class, 906-9
bitmaps. See also imaging
Bitmap class, 906-9
format, 907
HttpResponse objects and, 1333-35
icons, 915-16
transparent and semitransparent, 913-15
blending, alpha, 902
blocks
class, 77, 81
Enum, 81, 110-11, 379
interface, 279-81
module, 74-75, 81
namespace, 80-81
property, 184-86
scope and, 87-88
structure, 81, 115-18
SyncLock, 532-34
Try...Catch...Finally...End Try, 142-49
variables in, 90-92
With...End With, 78-79, 284
block-scoped variables, 90-92, 99
BMP (bitmap) format, 907
bookmarks, 56, 60
BooleanSwitch class, 168-69
Boolean type, 93-94
Boolean values, BitArray objects and, 398-99
boxing values, 108, 248, 341-43
box mode selection, 55
Breakpoints window, 65, 160-61
<browserCaps> configuration file section, 1411
browsers
ASP.NET configuration, 1411
AutoPostBack property and scripting settings, 1211
disabled cookie support, 8
Internet Explorer. See Internet Explorer
testing capabilities of, 1328
testing XML Web services in, 1476-79
Brush objects, 894, 895-99, 920-21
BufferedStream objects, 429
buffering reponses, XML Web service and, 1498-99
buffer overflows, FileSystemWatcher, 937
ButtonBase class, 788-89
Button controls
Web Forms, 1238-40
Windows Forms, 788, 790
buttons
command, 1290-91
navigation, 1311-15
Buttons collection, 819-20
ByRef arguments, 121, 185, 558
Byte type, 93
ByVal arguments, 121, 178
C
C#
Class View window and, 55
Common Language Specification and, 20
compiler, 24-27
cross-language interoperability and, 12
optional arguments, 181
overridable methods, 245
using statement, 202
Visual Studio .NET and, 48
C++
ADO and, 999
cross-language interoperability and, 6
Managed C++, 12, 20
Cache class, 1352-59
enforcing file and key dependencies, 1354-56
enforcing time dependencies, 1356-57
inserting items, 1352-54
setting up remove callbacks, 1357-59
XML Web service access, 1495-96
CacheDependency objects, 1354-56
caching. See also session state management
ASP.NET, 15
Cache class, 1352-59
fragment or partial, 1425, 1436-38
page, 1348-51
regular expression, 490-91
StreamWriter, 433
XML Web service results, 1499
calculated values, performance counter, 960-61
Calendar control, 1256-61
callback procedures
asynchronous, 555-57
delegates and, 309-10
implementing callbacks to callers, 311-12
setting up remove, for Cache, 1357-59
Timer class and, 549-51
CallingConvention argument, 325
calls
asynchronous, 551, 553-55
IEnumerator members, 298-302
procedures, 120-21. See also arguments; procedures
procedures in external DLLs, 129-31
Call Stack window, 65, 161
Call statement, 120
camelCase, 88, 179
Caption property, 691-92
CaptureCollection and Capture classes, 502-4
capturing mouse, 704
cardinal splines, 889-90
caret (^), 102
caret equals (^=), 105
case
camelCase, 88, 179
PascalCase, 78, 88, 176, 179, 380
case sensitivity
comparisons, 290, 346, 408, 410
XML tags and attributes, 579
cast operations. See coercion
catastrophic exceptions, 145
Catch keyword, 138, 142-45
categories, performance counter, 955-56, 962-64
CChar function, 95, 102
Ceiling function, 133
centralized configuration files, 1409-10
Challenge/Response authentication, 1385
character classes, regular expression, 484-85
character escapes, regular expression, 484
characters. See also strings
case. See case; case sensitivity
Char type, 95, 102, 363
formatting, 354-59
literal, 95, 361
nonprintable, 484
regular expression, 484-90
type suffix, 178, 367
Unicode, 95, 130, 937
wildcard, 23, 56, 423
CharSet argument, 324
CharSet field, 320
Chars property, 344
Char type, 95, 102, 363
CheckBox control, 788-90
CheckBoxList control, 1255-56
CheckedListBox control, 681, 796-97
child forms, showing MDI, 744-46
.chm files, 782
Chr function, 95
CInt function, 101
circular buffers, 400-401
circular references
COM, 5-6, 196
.NET Framework and, 11-12
class block, 25
classes, 77-79, 175-235. See also objects
abstract, 261-63
ADO.NET, 45-46, 1006-10. See also ADO.NET applica.tions
arrays as public members of, 115
attributes. See attributes
base. See base classes
Class...End Class blocks, 77, 81, 175
Class View window and, 56
code-behind, 1203
COM Interoperability and, 46-47
constructors, 189-95
converting between XSD files and, 476-79
creating, to pass data to and from threads, 525-29
creating HTTP Handler, 1378-81
custom attribute, 329-31
custom collection and dictionary, 413-18
delegate, 303-4. See also delegates
derived. See derived classes
events, 215-26. See also events
exception, 140-42
fields, 175-78. See also fields
Framework Class Library (FCL), 41-48
GDI+, 46. See also GDI+
HTTP handlers, 1378-80
Imports statement and, 85
inheritance and. See inheritance
interfaces. See interfaces
member shadowing. See shadowing
methods, 179-84. See also methods
modules for, 73-74, 77-79. See also modules
namespaces and, 80. See also namespaces
naming, 78
nested, 264-67
.NET Framework class hierarchy, 11-12, 339
noncreatable, 229-31
object lifetime. See object lifetime
overriding members. See overriding
properties, 184-89. See also properties
proxy. See proxy classes, XML Web service
as reference types, 340
reflection, 632
regular expressions, 482-84
scope. See scope
sealed, 240, 260-61
shared members, 226-35. See also shared members
synchronized, 534-35
template, 1318-22
tracing, 163-71
types. See types, .NET Framework
variable declaration and scope, 87-88. See also variables
virtual, 261-63
wrapper, 529-31
Windows Forms, 675, 679-80
XML, 1146-48
CLASSID attribute, 881-83
Class_Initialize event, 190-91, 238
Class Library projects, 50
Class_Terminate event, 197
Class View window, 54-55
cleanup code, 147, 202-3, 286, 991-92
clearing array elements, 391-93
Clear method, 391
ClearType technology, 924-25
client applications
creating, for assembly binding, 586-89
creating custom control, 837-38
creating XML Web service, 1479-83
client-side features
ADO.NET, 45
applications. See client applications
cookies, 1341. See also cookies
HTML code, 1200-1202
HTML controls, 1222
pages, accessing user controls from, 1434
script code, 1466-72
SOAP extensions, 1527
validation, 1242
Windows Forms as, 19
<clientTarget> configuration file section, 1411-12
Clipboard
copying data into, 766-68
implementing drag-and-drop, 769-73
pasting data from, 768-69
PrintScreen key and, 759
rings, 766-73
Clipboard object, 766-73
Clipboard Rings, 56, 59-60
clipping regions, 900-902, 913
CLng function, 101
Clone method, 113-14, 291-94, 349, 388, 695
cloning. See also copying
arrays, 113-14, 388
Clone method, 113-14, 291-94, 349, 388, 695. See also IClo.neable interface
deep object, 450-51
fonts, 695
String, 349
closed files, 424
closing
connections, 1014-21
forms, 722
Stream objects, 434
ClrVersion property, 883
CLS (Common Language Specification), 20. See also languages, .NET Framework
.cls files, 73
code
access permissions, 40
adding, to user controls, 1430-32
ASP, 7-8
ASP.NET access configuration, 1420
assemblies and reuse of, 569
attribute information. See attributes
browsing and fixing, for Windows service applications, 982-84
cleanup, 147, 202-3, 286, 991-92
code-behind classes, 1203
code-behind modules, 14
commands, functions, and constants, 131-38. See also com.mands; constants; functions
compiling. See compilation; compilers
creating menus, 737-41
creating XML Web service source, 1487-88
data binding via, 831-32
debugging, 157-71. See also debugging
error handling. See error handling
execution flow control, 119-31
form designer and generation of, 676-78
HTML. See HTML code
managed and unmanaged, 21
native, 27, 31, 32, 615-17
polymorphic. See polymorphic code
programmatic security, 1402-5
provider-agnostic, 1137-42
verification, 38-39
Visual Studio .NET editor, 55-58
code access permissions, 40
<codebase> configuration file section, 580
codebase hints, 581-82, 594-95
codebase property, 572
code-behind classes, 1203
code-behind modules, 14
code editor, Visual Studio .NET, 55-58, 982-84
code pitching, 34
code round-trip, 30, 613
coercion
Convert class, 370-71
CType function, 108-9, 114, 242, 284, 313
DirectCast operator, 109-10
interface methods, 284
multicast delegates and, 313-14
Option Strict and, 100-102
overloading methods and, 182-83
type checking and, 26
collapsible regions, 56, 57, 80
CollectionBase abstract class, 414-16
collections, 396-418. See also arrays
ArrayList class, 402-5
BitArray class, 398-99
CollectionBase abstract class, 414-16
custom, 413-18
DictionaryBase abstract class, 417-18
Hashtable class, 405-8
ICollection, IList, and IDictionary interfaces, 396-98
Queue class, 400-401
ReadOnlyCollectionBase abstract class, 413-14
SortedList class, 408-11
Stack class, 301-2, 400
StringCollection and StringDictionary classes, 411-13
System.Collections namespace and, 396
CollectionUtils objects, 408, 411
Collect method, 200, 210
collisions, hash table, 406
colon (:), 129
Color class, 692-93
ColorDialog control, 804-5
colors
for forms and controls, 691-93
selecting, 804-5
columns
DataGrid control, 1301-4
DataList control, 1296-98
DataReader, 1040-43
DataTable, 1056, 1067-69
ListBox control, 792-93
COM (Component Object Model)
ADO via COM Interoperability, 1000, 1004-5
COM+ Services layer of .NET Framework, 18
components and ASP, 7
.NET Framework as better, 10-11
P/Invoke and interoperability with, 46-47
reference counters, 195-96
references to components, 52-53
Registry and, 929
security, 4
shortcomings of, 4-6
Combine method, 312-13
ComboBox control, 797-98, 827-29
COM Interoperability
ADO via, 1000, 1004-5
P/Invoke and, 46-47
threads and, 525
CommandBuilder objects, 1096-97, 1099-1103
command buttons and command events, DataList control, 1290-91
command event handlers, DataGrid control, 1305-9
command-line information, 137
command-line tools. See assembly command-line tools
command-line type browser, 662-68
Command objects, 1025-38
ADO.NET and, 1000, 1006. See also ADO.NET applications
automatic population of Parameters collection, 1036-38
creating, 1027-28
DataAdapter objects and, 1086, 1094, 1118-22
DeriveParameters method, 1038
ExecuteReader method, 1029-31
ExecuteScalar method, 1031
ExecuteXmlReader method, 1031-32
issuing database commands, 1028-29
parameterized, 1032-33, 1118-22
parameters and stored procedures, 1032-38
properties and methods, 1026-27
provider-agnostic, 1138
reading data, 1029-32
commands, 131-38. See also constants; functions
changing order of insert, update, and delete, 1106-8
Command objects. See Command objects
customizing insert, update, and delete, 1103-6
date and time, 133-34
file, conversion, and information, 135-36
interaction, 134-35
math, 132-33
operating system information, 136-38
SQL, 1099-1103
string, 131-32
Windows service custom, 992
Command window, 62-64, 68
comments, user, 60
common dialog controls, 682, 803-8
ColorDialog, 804-5
FontDialog, 805
OpenFileDialog, 803-4
PageSetupDialog, 807-8
PrintDialog, 806-7
SaveFileDialog, 804
common language runtime
ASP.NET configuration, 1415-16
MSCorEE.dll, 18, 31
.NET Framework architecture and, 18
performance counters, 956-58
querying for browser support of, 883
thread local storage (TLS) and, 525
versions of, 137, 596, 883
Common Language Specification (CLS), 20. See also languages, .NET Framework
Common Type System (CTS), 18
compact .NET Framework, 16-17
Compare method, 288, 350-51, 353
CompareTo method, 287-88, 346, 366-67
CompareValidator control, 1242, 1246-47
compatibility
binary, 5
cross-platform, 34
<compilation> configuration file section, 1412-13
compilation. See also assemblies; compilers
ASP.NET configuration, 1412-13
Conditional attribute, 326-27, 331
constants, 164
on-demand, of Web Forms applications, 1203-4
Option Strict directive, 100-102
overloaded methods and, 180-81
overriding members and, 248
recompiling projects, 841-42
round-trip, 30, 613
compilers. See also compilation; ILDASM
C#, 24-27
ILASM, 29-30
Just-in Time. See Just-in-Time (JIT) compiler
Native Image Generator (NGEN), 33, 615-17
.NET Framework languages and, 13
system path and, 23
Task List window and, 60
Visual Basic .NET. See VBC
Complement method, 900
complex data binding, 822
Component class, 679
components. See also DLLs
ASP.NET and, 14
assemblies and, 35, 563
COM. See COM
custom controls. See custom controls, ASP.NET
data binding with designable, 829-31, 1265
licensing, 876-81
.NET Framework private and shared, 10-11
Object Browser and, 54-55
publisher configuration files, 578-80
references to, 52-53
Toolbox and, 59
Win32. See Win32 objects
component tray
designable components, 829-31
invisible components, 58, 678
FileSystemWatcher component, 933
MainMenu objects, 731
PerformanceCounter components, 959
composite custom controls, ASP.NET, 1438, 1462-66
composite custom controls, Windows Forms, 849-55
adding properties, methods, and events, 850-52
adding resize logic, 855
creating UserControl component, 849-50
shadowing and overriding properties, 852-54
compression, graphics, 908
concatenation, 350, 363-65
Concat method, 350
Conditional attribute, 326-27, 331
conditional statements, 126-28
.config files, 578. See also application.config files; machine.con.fig files; web.config files
configuration files, 595-601
ASP.NET. See configuration files, ASP.NET
creating example, 590-91
debugging and tracing settings, 165-66
dynamic properties, 597-98, 764-66
garbage collection and, 596-97
.NET Framework, vs. Registry, 10
.NET Framework Configuration tool, 598-601
probing, binpath, and, 590-91
security and, 41
common language runtime version and, 596
session state and, 1343, 1345, 1346-47
trace switches, 169-70
types of, 578. See also application.config files; machine.con.fig files; secondary web.config files; web.config files
version policies in application, 578-80
configuration files, ASP.NET, 1323-24, 1405-21
activating SOAP extension from, 1520-21
adding HTTP handlers to, 1376-78
advantages of, 1405-6
authentication section, 1410-11
authorization section, 1411
browser capabilities section, 1411
centralized, 1409-10
client target aliases section, 1411-12
compilation section, 1412-13
configuration inheritance, 1408-9
configuration sections, 1406-8
custom errors section, 1413-14
enabling protocols in, 1486-87
forms authentication settings, 1396-98
globalization section, 1414
HTTP handler section, 1414-15
HTTP module section, 1415
HTTP runtime section, 1415-16
identity impersonation section, 1416
machine key cookie section, 1416
page configuration section, 1416-17
process model worker process section, 1417-20
security policy section, 1420
session state section, 1420
settings, 1410-21
trust code access security section, 1420
types of, 1406
URL authorizations, 1393-94
Web services section, 1420-21
Windows authentication settings, 1392-93
Configuration Manager, 159-60
configurations
application, 601. See also configuration files
project, 157-58
solution, 158-60
<configuration> sections, 1406-8
ConfigurationSettings objects, 597-98
configured assemblies, 600
conflicts, update. See update conflicts
connected mode, ADO.NET, 1006, 1007, 1047. See also ADO.NET applications
Connection objects, 1010-25
ADO.NET and, 1000, 1006. See also ADO.NET applica.tions
creating Transaction objects, 1022
DataAdapter objects and, 1086. See also DataAdapter objects
error handling, 1015-17
leveraging connection pooling, 1018-21
module-level connnection strings, 1014
named transactions, 1024-25
nesting transactions, 1024
opening and closing connections, 1014-21
opening databases asynchronously, 1017-18
properties, methods, and events, 1010-11
provider-agnostic, 1138
selecting isolation level, 1022-23
setting ConnectionString property, 1012-14
State property and StateChanged event, 1014-15
transactions and, 1021-25
connections
Connection objects. See Connection objects
pooling, 1018-21
Server Explorer window and, 61, 829
strings. See connection strings
ConnectionString property, 1012-14
connection strings
ADO.NET, 1012-14, 1084
ASP.NET, 1209
Console Application projects, 51
console applications
assemblies and, 35
Console objects, 22, 69
creating, 22-24
example, 71
projects, 51
running, with Visual Studio .NET, 69-71
Console objects, 22, 69
constants. See also commands; functions
compilation, 164, 327
date and time, 133
Enums and, 110-11. See also Enum type
interaction, 134
math, 133
public, 78, 178
string, 131-32
Constants class, 131
constraints, enforcing, 1051, 1080-83
constructors, 189-95
with arguments, 190-92
attribute, 319, 329
creating objects dynamically, 660-61
in derived classes, 249-51
Finalize method and, 205-6
object-oriented programming and, 175
overloaded, 192-95
read-only fields and, 195
Private, 230-31
scope qualifiers and, 272-75
shared, 231-33
structures and, 116-17
Sub New procedures as, 75-76, 189-90, 678
constructors, regular expression grouping, 485
constructs, regular expression, 484-90
ContainerControl class, 680, 707
container controls, 707-9
containers, key, 576-77
contention rate, thread, 521
context
data binding, 823-24
security, for Windows services, 988-89
stream, 443, 444, 452, 455-57
thread, 512
ContextMenu objects, 681, 732-35, 742-43
context menus, 681, 732-35, 742-43
Context objects, 1352
ControlBindingCollection objects, 723-24
ControlChars class, 131-32
Control class
ASP.NET custom control, 1444-46. See also custom con.trols, ASP.NET
Form class and, 679-80, 710. See also controls, Windows Forms; Form class; forms
inheriting from, 856-58
@Control directive, 1221, 1426
control flow. See execution flow control
control locking, 59
controls, Web Forms, 1222-1322
AdRotator, 1261-62
AutoPostBack property, 1207-11
dropping, on pages, 1199-1200
Calendar, 1256-61
custom controls. See custom controls, ASP.NET
data binding. See data binding, Web Forms control
DataView objects and, 1074
HTML Server, 1223-32
list, 1252-56
projects, 51
template, 1222. See also template controls
text formatting in Visual Studio .NET and, 1273-75
types of, 1222-23
user controls. See user controls, ASP.NET
validation, 1242-52
WebControl native ASP.NET, 1222. See also WebControl controls
Xml, 1263
controls, Windows Forms, 678, 679-91, 785-883
accessing, from other threads, 862
ActiveX, 709-10
adding, dynamically, 728-30
CheckBox, RadioButton, and Button, 788-90
CheckedListBox, 796-97
ColorDialog, 804-5
ComboBox, 797-98
common dialog, 803-8
common events for forms and, 688-91
common methods for forms and, 686-88
common properties for forms and, 682-85
common tasks for forms and, 691-710
container, 707-9
Control class, 679-80
custom. See custom controls, Windows Forms
data binding. See data binding, Windows Forms control
DataView objects and, 1074
docked and anchored, 697-700
dynamic properties, 764-66
ErrorProvider, 799-800
FontDialog, 805
fonts and, 694-95
forms as, 680. See also Form class; forms
GroupBox, 819
HelpProvider, 801
HScrollBar and VScrollBar, 818-19
ImageList, 808-9
input focus and, 704-7
invisible, 678
keyboard handling, 700-702
Label, 786-87
LinkLabel, 787-88
ListBox, 790-96
ListView, 813-18
mouse handling, 702-4
NotifyIcon, 819
NumericUpDown and DomainUpDown, 820-21
OpenFileDialog, 803-4
PageSetupDialog, 807-8
Panel, 819
PictureBox, 680, 818
PrintDialog, 806-7
ProgressBar, 821
projects, 51
provider, 798-801
RichTextBox, 821
SaveFileDialog, 804
size and position of, 695-97
Splitter, 801-3
StatusBar, 820
System.Windows.Forms namespace, 679-80
TabControl, 820
text and colors and, 691-93
TextBox, 706, 785-86
thread safety and, 534, 938
Timer, 58, 819
ToolBar, 819-20
ToolTip, 798-99
TrackBar, 821
TreeView, 809-13
validating, with ErrorProvider control, 799-800
Visual Studio Toolbox and, 681-82
windowless, 682, 710
Controls collection, 678, 707, 728-30
conversion
.aspx pages to user controls, 1427
between classes and XSD files, 476-79
Convert class, 370-71
error codes to strings, 135
external DLLs and, 130-31
functions, 95, 135-36
Guid values to Bytes, 379
type. See coercion
type names, 136
Conversion class, 135
Convert class, 370-71
CookieContainer property, 1507-9
cookies
ASP, browsers, and, 8
ASP.NET configuration, 1416
cookieless sessions, 15, 1342, 1343-44
forms authentication and, 1395
HttpResponse, 1332-33
session state management and, 1341
XML Web service, 1507-9
cooperative multitasking, 511-12
coordinate systems, 903-6
copying
array elements, 391-93
data into Clipboard, 766-68
objects. See cloning; ICloneable interface
shadow, 1203
Copy method, 391-93
_CorMainExe function, 31, 564
corvars.bat file, 23, 602
CounterCreationDataCollection objects, 963
CounterCreationData objects, 963-64
counters, performance. See performance counters
counters, reference, 195-96
CPU registers, 65
CreateChildControls method, 1462-66
CreateInstance method, 387, 660
critical sections, 539
cross-language interoperability
C#, Visual Basic .NET, and, 25
.NET languages and, 12-13, 21
problems, 6
cross-platform compatibility, 34
CrystalReportViewer control, 682
CSC compiler, 24-27
.cs files, 73
CSng function, 101
Ctrl key combinations
Ctrl+A, 679
Ctrl+F5, 70
Ctrl+I and Ctrl+Shift+I, 56
Ctrl+Minus and Ctrl+Shift+Minus, 55
Ctrl+R, 56
Ctrl+Shift+P, 67
Ctrl+Shift+R, 66-67
Ctrl+Shift+V, 56
CTS (Common Type System), 18
CType function, 108-10, 114, 242, 284, 313. See also coercion
culture
assemblies with, 591-92
current, 290, 351
information, 351-53, 363, 761-62, 764
locale and sorting, 290
localized forms, 759-64
probing and, 584
ToString method, 366
CultureInfo class, 351-53, 363, 761-62, 764
.cur files, 780
curly braces ({}), 25, 112-13, 361
Currency type, 94
current application process, 943-45
CurrentCulture property, 290, 351
current directory, 136
Current property, 295
CurrentThread objects, 761-62
current user, 137
Cursor objects, 778-81
creating new, 780-81
static properties and methods, 778-80
cursors
firehose, 999
mouse, 778-81
server-side, 19, 997, 999, 1004
custom attributes
activating SOAP extension with, 1521-22
assembly, 617-18
building classes for, 329-31
discovering, at run time, 331-34
custom controls, ASP.NET, 1438-72
adding properties, 1446-52
client-side script code and, 1466-72
composite, 1462-66
Control and WebControl classes, 1444-46
creating, 1439-46
generating postback events, 1456-59
handling postback data, 1453-55
handling postback events, 1459-62
HTML and JavaScript client-side code, 1466-67
HtmlTextWriter class, 1442-44
MultiplierEx example, 1467-72
raising server-side events, 1455-56
rendering style attributes, 1452-53
Render method, 1441
types of, 1438
user controls vs., 1425-26, 1438-39. See also user controls, ASP.NET
custom controls, Windows Forms, 835-81
adding attributes, 845-48
adding properties, 843-45
adding properties, methods, and events, 850-52
adding resize logic, 855
adding validation logic, 838-41
approaches, 835
automatically updating references to projects, 842
composite, 849-55
creating, from scratch, 856-58
creating client application, 837-38
creating UserControl component, 849-50
creating Windows Control Library project, 836-37
custom property editors and, 866-72
default values and, 848-49
design-time and run-time licensing, 876-81
extender provider, 863-66
hosting, in Internet Explorer, 881-83
improving, 843-49
inheriting from existing controls, 836-43
multithreaded, 859-63
object properties and, 872-76
recompiling, 841-42
shadowing and overriding properties, 852-54
testing, 842-43
<customErrors> configuration file section, 1413-14
customizing. See also inheritance
ASP.NET controls. See custom controls, ASP.NET
attributes. See custom attributes
collections, 413-18
commands, 568
DataGrid control paging, 1311, 1315-16
date and time formats, 358-59
error pages, 1363-64, 1413-14
event log messages for Windows services, 991-93
event logs, 972-73
exception objects, 152-53
expressions, 1077-80
formatting strings, 355-56
forms authentication, 1400-1402
insert, update, and delete commands, 1103-6
login pages, 1395
performance counters, 963-66
serialization, 452-60
stream readers and writers, 437-39
template classes, 1318-22
trace listeners, 168
Windows Forms controls. See custom controls, Windows Forms
Windows service commands, 992
XML Web service authentication, 1515-19
custom log, 585
CustomValidator control, 1242, 1248-50
cut-and-paste inheritance, 238
Next
Last Updated: April 10, 2002
|