|
|
 |

 |
|
Microsoft® Visual C#™ .NET Step by Step
|
|
 |
Author |
 |
John Sharp, Jon Jagger
|
 |
|
Pages |
656
|
|
Disk |
1 Companion CD(s)
|
|
Level |
All Levels
|
|
Published |
01/23/2002
|
|
ISBN |
9780735612891
|
|
ISBN-10 |
0-7356-1289-7
|
|
Price(USD) |
$39.99
To see this book's discounted price, select a reseller below.
|
|
|
|
|
 |
|
|
Index
^ operator, 283
<exception> tag, 15
<param> tag, 15
<remarks> tag, 15
<summary> tag, 15
<value> tag, 15
A
abstract classes, 229-232, 242
abstract data types, 128
abstract methods, 232-233
access attributes, 263-278
accessibility, 127-128, 225-226
accessor methods, 264-276
Active Server Pages (ASP), 504, 514,
adapting to IDisposable, 253-254
adding a shortcut key to a menu item, 364
adding controls to a form, 350
adding controls to Toolbox, 438
adding items to a menu, 364
addition, compound, 80
addValues method, 50
ADO.NET, 441-460, 504, 541, 580
alias, 153-154, 158, 177
allow Validating event to be raised, 377
allowing docked controls to be resized, 403
anchoring a control, 403
argumentList, 50
arguments, 54, 149-152, 206
arithmetic operators, setting, 38-
array indexing, 186
array variables, 204
ArrayList, 193-194
arrays, cascading if statement, 73; compared to indexers, 285; declaring and using variables, 183-204; indexers, 279-292
ASP.NET, 524-525, 533-534, 540
assigning values, 64
assignment statements, 79-80
associating a pop-up menu, 364
associating XML files with XML schemas, 497
associative arrays, 197
associativity, compound assignment operators, 80; evaluating expressions, 42-43; incrementing and decrementing variables, 81-83; operator constraints, 312
asterisks, 9, 43
asynchronous execution, 598-601
attributes, 263-278, 580
authentication, 534-539
AutoClosing, 253-254
AutoPostBack property, 518, 524
B
bandwidth, 502, 524
base classes, 220
basics of XML, 479-497
bin folder, 10
binary operators, 64-65, 312, 314
bindGrid method, 543, 557
binding the DataGrid, 560-561
bitwise operators, 280
blocks, defined and explained, 68; do statements, 86; explicit statements, 84; finally, 119-120; try, 100-101, 119
bool data type, 64-77
bool elements, 185
Boolean expressions, cascading if statements, 69; declaring quick reference, 78; declaring variables, 63;
do statements, 85; for statements, 83; operators, 64; short circuiting, 66; showBoolValue method, 37; throwing exceptions, 115; while statements, 81
bounds checking, 186
boxing, 159, 192
braces (curly brackets), 42, 46-48, 82-84, 166
brackets, 42
break statements, 74, 87
breakpoint, 582
browsing data in Visual Studio.NET, 459
Build Comment Web Pages, 18
building applications, 28
built-in conversions, 322
business facades, 584
business logic, 504, 584
business-to-business (B2B), 574
business-to-customer (B2C), 574
Button class, 305-307
buttons, 26, 510-512, 565-566
C
C programming language, % operator, 38; arrays, 183; break statements, 75; converting integer value to Boolean true or false, 68; global methods, 46; integer to Boolean conversion, 82; params, 208
C++ programming language, accessibility, 224; % operator, 38; ArrayList and SortedList, 198; arrays, 183;
break statements, 75; control allocation, 246; converting integer value to Boolean true or false, 68; default arguments, 54; global methods, 46; inheritance, 220; integer to Boolean conversion, 82; keywords, 127;
order of object destruction, 249; params, 208; virtual methods, 224; Web services, 574
Cache objects, 546
caching, 503-505, 535, 545, 553, 557-558
calculate_Click method, 116-118
callback, 600
calling, delegates, 297; disposal methods, 255-256; events, 304-305; methods, 49-51; struct constructors, 174
cascading if statements, 69-74, 115
case labels, 75
case sensitivity, 6, 30, 32
casting, 160, 168, 209
catch handlers, 101, 116-119
catching exceptions, 121
chaining, 304
changing control properties, 350
changing form properties, 350
characters, assignment operator, 33; asterisks, 9; Boolean NOT operator, 64; brackets, 42; colon, 127; commas, 46, 50; matched pairs, 8; parentheses, 42; semicolons, 84; tilde, 247; underscores, 31
checked keyword, 107
checked statements, 107
class keyword, 126
class methods, 140, 145, 148
class scope, 52-53
class types, 147
classes, cs files, 17; abstract, 229-232; base and derived, 220; Button, 305-307; classification and encapsulation, 125; compared to structs, 319; Console, 7; derived, 220, 226, 271; exception, 113; IntelliSense icon, 9; keyword combinations, 242; Object, 158; proxy, 592, 596, 598; Queue, 194; Random, 200; scope, 52-53; sealed, 233; SortedList, 197; Stack, 196; System.Array, 191; System.Delegate, 296; System.Object, 158; variables declared in, 40; Windows forms example, 21
classification, 125-126, 220
clients, applications, 503; SOAP, 592; validation quick reference, 531; validation, 524
Code pane, 9, 16-17, 7
Code view, 19
collection classes, 192, 198-203
colons, 127
columns, 558-563, 571
command line compilation, 11
Command shell, calling Main with command line arguments, 217; command line compilation, 11; Debugging program, 10; extracting code documentation, 14; modifying environment variables, 11; opening from Windows Explorer, 12; overflow checking of source files, 108
CommandArgument property, 566
CommandName property, 566
commas, 46, 50, 166
commenting, 14, 28
common language runtime, 102
Common Language Specification (CLS), 32, 128
Common Object Request Broker Architecture (CORBA), 574
CompareValidator, 524
compile time errors, arithmetic operators, 38; base class constructors, 222; Boolean expressions, 68; boxing and unboxing, 159-160; fall-through, 75; method call examples, 50; overloaded identifiers, 53; struct Time, 172
compiler-generated constructors, 130-131
compiling, 11, 14
complex controls, 379-404
complex data, 583-
components, GUI, 421-438
compound assignment, 316
compound operators, 79, 108
computer memory, 156
concatenating string values, 38, 41
condition, Boolean, 83
configuration files, 505
console applications, 4, 28
Console class, 7, 53
Console.WriteLine, 212
const keyword, 141
constantExpression, 74
constants, 185
constraints, 312-313
constructors, base class, 221-222; calling and declaring quick references, 145; compared to classes, 171; defined and explained, 129-131; initializing an object, 246; memory heap, 156, 159, 184; symmetric operators, 314-315; throwing exceptions, 113; Windows forms example, 21
continuation condition, 83, 98
continue statements, 87
control properties, 24
control variable updates, 83
controlling accessibility, 127-128
controlling precedence, 42
controllingExpression, 74
controls, complex, 379-404; DataGrid, 533-534, 540; DataList, 570; Repeater, 570; ValidationSummary, 528-530
conversion operators, 321-323
converting, 38
cookies, 503-504, 538
copying, 188-190
copying struct variables, 176
copyOne method, 76
core syntax, 220
creating a connection to a database graphically, 459
creating a form menu, 364
creating a separator bar in a menu, 364
creating a Windows Forms project, 350
creating an XML file, 497
creating an XML schema, 497
creating and executing database query in code, 459
creating components, 421-438
creating disconnected DataSet, 478
cs files, 6
csproj files, 6
curly braces, 42, 46, 48
CustomValidator, 525
D
data, complex, 583-585; displaying quick references, 553; editing, 547, 553; editing, 547; in DataGrid, 542-543; narrowing and widening, 209; passing between Web forms quick reference, 571; querying, 539-546; retrieving on demand, 543-546; sorting quick reference, 571; static methods, 139; validation, 365-377;
data binding, 461-478
data controls, 504
data types, 33, 64, 128
databases, 441-460, 550-554
DataBind method, 558- , 570
DataGrid control, 533-540, 543-546, 553-570
DataList control, 570
DataSets, 441-478,
dateCompare method, 71
deallocating resources, 246
declaration statement, 32
declaring methods, 45
declaring variables, 32-33, 63
declaring a delegate, 296
declaring an event, 303
declaring an indexer, 282
declaring increment and decrement operators, 316-318
declaring interface properties, 271-276
decrement operators, 316-318
decrementing variables, 81-83
default arguments, 54
defaults, 135, 167
definite assignment rule, 153, 167, 174
Definite Assignment Rule, 33
delegate instances, 298-300
delegates, 293-310
delegates, 9, 600
deleting rows of data, 547-549
derived classes, 220, 226, 271
Design view, 19
destructors, 246
determining operator values, 38-39
determining the current context for pop-up menu item, 364
determining which node user has clicked, 403
diagnostic messages, 14
dialog boxes, 405-420
digital clock application, 300-302, 307-
direct types, 147
disabling client validation, 527
DISCO XML schema, 595
displaying data, 571
displaying data using DataGrid, 459
displaying hierarchical data, 403
displaying list of complex objects, 403
disposal method pattern, 250
Dispose method, 256
DivideByZeroException, 118
do statements, 85
doCalculation method, 114
documentation, 14-16
documents, 351
duplication, 230
dynamic discovery, 595
dynamic HTML, 524, 527, 530
dynamically create a pop-up menu, 364
dynamically populating a ComboBox or ListBox, 350
E
editing data, 547
elements, 185, 204
else clause, 67
EnableClientScript property, 527
EnableViewState property, 521
enabling and disabling menu items, 364
enabling notification, 302
encapsulation, 126, 141-143, 170, 226, 263
encryption, 538
Entrance method, 149-151, 181
enumeration types, 166
enums, 9
equality operator, 64
errors, affecting reliability of messages, 14; controlled, 13; displaying messages quick reference, 531; displaying validation error messages, 525, 530; if statement syntax, 69; switch statement, 74
evaluating expressions, 42-43, 82
event handler, 515-522
events, 293-310
exceptions, general, 100-101; associated with memory, 157; integer arithmetic, 107; NullObjectReference, 566; NullReferenceException, 297; OverflowException, 107, 110; ProductNotFound, 588; throwing, 107, 112, 121
exception-safe disposal, 251
executable files, 11
executable programs, 216
ExecuteScalar method, 580
explicit conversions, 209
explicit declaration, 32, 166
explicit implementation, 286
Explicit Interface Implementation (EII), 240-242
Explorer Interface, 379-381
expressions, Boolean, 63-65; constantExpression, 74; controllingExpression, 74; evaluating with associativity, 42-43; evaluating, Boolean, 82; if and else statements, 67; return statements, 47-48; while statements, 81
extending .NET Framework control classes, 438
F
facades, 584
fall-through, 75
fetching data, 459
fields, class scope, 52-53; compared to methods, 263-265; declaring quick references, 145; instances, 140; private and public, 127-128; shared, 140; variables declared in a class, 40; Windows forms example, 21
FileInfo class, 89
finally block, 251
finally blocks, 119-120
finally keyword, 119
floating point arithmetic, 108
floating point, 209
for statements, 83-85, 187
forms, 19-27
framework, 234
free-format language, 30
functions, 140
G
garbage collection, 245-250
general catch handlers, 102-103
generating a DataSet, 459
get accessors, 266, 271, 282
global methods, 46
global variable, 100
goto statements, 75
Graphical User Interface (GUI), 296, 305-307, 421-438
grouping, 68, 82
grouping controls and subdividing forms, 403
H
handling an event for a control or form, 350
heap, 156, 159, 184
hidden parameters, 267
hiding, 223, 225
Hungarian notation, 33, 227
Hypertext Markup Language (HTML), ASP.NET, 504; Build Comment Web Pages, 18; controls, 514, 520-522; generated from XML, 15; Hypertext Transfer Protocol (HTTP), 502; login form example, 536-538; templates, 558-559; Web form example code, 509-510, 518-520
Hypertext Transfer Protocol (HTTP), post-backs, 521, 524; SOAP, 575-576, 592; Web server requests and responses, 502-505, 569
I
ico files, 6
icons, 9
identifiers, keywords table, 31; naming conventions, 132; naming methods, 45; overloading, 53-54; scope, 51-54; syntax rules, 30; using namespaces, 12
IDisposable, 253-254
if statements, 67-77, 115
if-else statements, 115
IIS, 504
implementing, client validation, 525-527; forms-based security, 535; interface, 228-229
implicit conversions, 209
implicit declaration, 32
increment operators, 316-318
incrementing variables, 81-83
index, 187
indexers, 279-292, 312
indicating values in error and displaying error information, 377
indirect types, 147
inequality operator, 64
inheritance hierarchy, 234
inheritance, 159, 168, 173, 191
inheritance, 219-244
inheritance, 226
inheriting from an interface, 226
initialization, 83-85, 131-132, 159, 171, 177, 185
InitializeComponent method, 23
initializing a CheckBox or radio button, 350
instance fields, 140
instance methods, 137-140
instance methods, 191
Int32.Parse method, 38, 92, 101,105-106
integers, addValues method, 50; checked and unchecked arithmetic, 106-112; converting from string value, 38; do statement example, 91-93; enumeration literals, 166; errors, 100
IntelliSense technology, 7-9
interface indexers, 287
interfaces, abstract data types, 128; declaring properties, 271-276; implementing an indexer quick references, 292; IntelliSense icon, 9; keyword combinations, 242; programmatic, 592
Internet, 502, 534-539, 574
Internet Inter-ORB Protocol (IIOP), 574
InvalidOperationException, 115
invariance, 187
IsPostBack property, 543
iteration, 187
J
Java programming language, arrays, 183; base class, 229; inheritance, 220; Internet, 574; virtual methods, 224
JavaScript programming language, 520
K
key/value pairs, 197
keywords, assigning variables to bool data type, 64-65; base, 221; checked and unchecked, 107; class, 126; combinations, 242; const, 141; finally, 119; new, 223, 246; object, 158; out, 154; override, 224-225; params, 207; private and public, 127; ref, 152-153; reserved identifiers, 30-31; static, 140; struct, 170; virtual, 224-225, 229, 272; void, 46-47
keyword-type equivalences, 177
L
languages, 30, 128
lhsOperand, 40, 50
library, 234
literal values, 166
local scope, 52
local variables, 33, 52, 156, 167, 173
locating items in code, 35
logical AND operator, 65
logical operators, 65
logical OR operator, 65
loops, 83, 85, 87, 188
M
Main method, 6, 23, 149, 216
making a control fill available space, 403
matched character pairs, 8
MathsOperators application, 40-41, 50-51, 103-106
memory cache, 535, 545
menu bar, 5
menus, 351-364
method body statements, 46
method calls, 50-51, 107, 154-156, 167, 173, 578, 596
Method Wizard, 54-58
methodName, 46, 50
methods, abstract, 232-233; accessor, 264-276; behavior of parameters, 148; bindGrid, 543;
calculate_Click, 116-118; calling a disposal method, 255-256; calling, 49-51; compared to fields, 263-265; compared to indexers, 285; constructors, 21, 129; copyOne, 76; DataBind, 558-559; dateCompare, 71; declaring, 45-49; disposal, 250; Dispose, 256; doCalculation, 114; Entrance, 149-151, 181; examining definitions, 48-49; ExecuteScalar, 580; Explicit Interface Implementation (EII), 240-242; global, 46; InitializeComponent, 23; Int32.Parse, 38, 92; interface, 228-229; Main, 6, 23, 149, 216; modifier, 264-276; multiplyValues, 110-111; overloaded identifiers, 53; Page_Load, 543; polymorphic, 224; private and public, 127-128; scope, 51-54; sealed, 233-234; showBoolValue, 37; showDoubleValue, 37; ShowFloatValue, 35-36; showIntValue, 36; signature, 222; static, 139-140; stepping into and out, 59-61; subtractValues, 41; ToString, 41; virtual, 224-225; Write.Line, 205; writing and calling instance, 137-139
Microsoft .NET Alerts, 574
Microsoft .NET Passport, 574
Microsoft Intermediate Language Disassembler, 248
Microsoft Internet Information Services (IIS), 504
Microsoft JScript .NET, 515, 524
Microsoft JScript programming language, 574
Microsoft Notepad, 518
Microsoft SQL Server, 533-534, 540, 545-552
Microsoft Visual Basic .NET, 515, 574
Microsoft Visual Basic programming language, global methods, 46; keywords, 47
modifier methods, 264
modifying properties of SqlDataAdapter object, 478
modifying rows, 550
modulus operator, 38
monitoring, 601
moving controls from one tab of Toolbox to another, 438
multiple catch handlers, 102
Multiple Document Interface (MDI), 405-420
multiple interfaces, 239-242
multiplyValues method, 110-111
N
namespaces, asp, 514; IntelliSense icon, 9; System, 158; System.Collections, 192; System.Runtime.Serialization,
584; System.Web, 515; System.Web.Security, 537; System.Xml.Serialization, 584; using, 11-12; Web services, 579; Windows forms example, 21
naming conventions 21, 132, 196, 265, 313, 322
narrowing data, 209
navigation button, 565-566
network protocols, 502
new keyword, 223, 246
no fall-through rule, 75
non-integer subscripts, 285
NOT operator, 64
notification, enabling, 302
null check, 305
null default, 135
NullReferenceException, 297, 305
O
obj folder, 10
Object class, 158
object death, 246
objects, Cache, 546; calling methods, 51; compared to values, 245-246; constructors, 142; instance of a class, 130; memory heap, 156, 159, 184; throwing exceptions, 112-113; unreachable, 249
operands, 38, 40
operator pairs, 318
operators, ^, 283; arithmetic, 38-39; bitwise and shiftwise, 280; compound assignment, 79-80, 108; controlling precedence, 42-43; conversion, 321-323; implementing, 318-321; incrementing and decrementing variables, 81-83; prefix and postfix forms, 82; symmetric, 314-315, 323-324; throwing exceptions, 115; unary and binary, 64; understanding, 311-312
optimizing data access, 545-546
out keyword, 154
outcome, 41
Output pane, 5
OverflowException, 107, 110
overloading, 53-54, 205, 285, 131-132, 313
override keyword, 224-225, 233
overriding and extending an event inherited from a control class, 438
P
Page_Load method, 543, 546
paging, 534, 543-546
parameter e, 549, 567
parameterList, 46
parameters, 53, 152-156, 167, 173, 599-601
params keyword, 207
params object[ ], 210-211
parentheses, 42-43, 50, 68, 82
parse failure, 101
performing an action on user click, 364
playing cards, 198-203
polymorphic methods, 224
positional notation, 229
post-back, 543
postfix operator form, 82, 317
precedence, 42-43, 80-83, 312
prefix operator form, 82, 317
primitive data types, 33-37, 64, 74
private keyword, 127
private methods, 127-128
procedural functions, 140
ProductNotFound exception, 588
programmatically connect to a database, 459
properties, AutoPostBack, 518; CommandArgument, 566; CommandName, 566; compared to indexers, 286-287;
control, 24; defined and explained, 265-276; EnableClientScript, 527; EnableViewState, 521;
implementing to access attributed, 263-278; IsPostBack, 543; Length, 189; paging, 544; read/write, 267-268; read-only, 267-268; restrictions, 268-269; ShowMessageBox, 530; Sort, 558; Text, 41; write-only, 268
protected access, 225-226
protocols, 575-576
proxy classes, 592, 596, 598
proxy objects, 578, 596, 600
public keyword, 127
public methods, 127-128
Q
querying data, 539-546
Queue class, 194
quick references,
accepting command-line arguments to Main, 218;
accessing a single array element, 204;
accessing a static field, 145;
adding a shortcut key to a menu item, 364;
adding a Web reference to an application, 602;
adding amount to a variable, 98;
adding controls to a form, 350;
adding controls to Toolbox, 438;
adding HTML controls to Web form, 522;
adding items to a menu, 364;
adding server controls to Web form, 522;
allow Validating event to be raised, 377;
allowing docked controls to be resized, 403;
anchoring a control, 403;
associating a pop-up menu, 364;
associating different statements with different values of a controlling expression, 78;
associating XML files with XML schemas, 497;
attaching a delegate to an event, 310;
browsing data in Visual Studio.NET, 459;
building applications, 28;
caching frequently-accessed data, 553;
calling a base class constructor, 243;
calling a class method, 145;
calling a constructor, 144;
calling a delegate, 309;
calling a destructor, 260;
calling a method, 62;
catching a specific exception, 121;
catching all exceptions in a single catch handler, 121;
changing control properties, 350;
changing form properties, 350;
changing value of a variable, 43;
checking type / range of user entered data values, 531;
commenting, 28;
comparing size of two values, 78;
controling column order in a DataGrid, 571;
coverting string to int, 43;
creating a Boolean expression with conditions, 78;
creating a connection to a database graphically, 459;
creating a delegate instance, 309;
creating a derived class from a base class, 243;
creating a form menu, 364;
creating a proxy class, 602;
creating a separator bar in a menu, 364;
creating a Web application, 522;
creating a Windows Forms project, 350;
creating an array instance, 204;
creating an XML file, 497;
creating an XML schema, 497;
creating an XML Web service, 590;
creating and executing database query in code, 459;
creating disconnected DataSet, 478;
declaring a write-only indexer, 292;
declaring a write-only property, 277;
declaring an array variable, 204;
declaring an conversion operator, 326;
declaring an enumeration type, 182;
declaring an enumeration value, 182;
declaring an event, 309;
declaring an indexer in an interface, 292;
declaring an interface, 243;
declaring an operator, 326;
decrementing a variable by one, 98;
delaring a class method, 145;
deleting rows using DataGrid control, 553;
detaching a delegate from an event, 310;
determining currently active child form, 419;
determining the current context for pop-up menu item, 364;
determining whether an asynchronous Web method has completed, 602;
finding out which button user pressed, 420;
finding the number of array elements, 204;
finding the number of elements in a collection, 204;
forcing garbage collection, 260;
forcing user to enter a value in a text box, 531;
generating a DataSet, 459;
grouping controls and subdividing forms, 403;
handling an event for a control or form, 350;
implementing an interface indexer, 292;
implementing an interface property, 278;
implementing an interface, 243;
incrementing a variable by one, 98;
indicating values in error and displaying error information, 377;
initializing a CheckBox or radio button, 350;
initializing elements of an array to specific values, 204;
initializing or assigning a struct variable, 182;
initializing or assigning an enumeration variable, 182;
invoking a Web method asynchronously, 602;
invoking a Web method synchronously, 602;
iterating through elements of an array/collection, 204;
making a control fill available space, 403;
making form parent MDI window, 419;
merging a child MDI form menu, 419;
modifying properties of SqlDataAdapter object, 478;
moving controls from one tab of Toolbox to another, 438;
navigating from one Web form to another, 571;
overriding and extending an event inherited from a control class, 438;
overriding precedence, 43;
passing data from one Web form to another, 571;
performing an action on user click, 364;
performing client-side validation, 531;
performing server-side validation, 531;
preventing user control property from displaying, 438;
programmatically arranging child forms, 420;
programmatically connect to a database, 459;
prompting user for name of file to be saved, 420;
raising an event, 310;
reading an XML file, 497;
releasing a resource at a known point in time, 260;
retrieving data on demand, 553;
return from a method before end, 62;
returning a value from inside a method, 62;
running a statement if condition is true, 78;
running applications, 28;
running multiple statements, 78;
running one or more statements one or more times, 98;
running one or more statements while continuation condition is true, 98;
saving changes in a DataSet, 459;
seeing if two values are equivalent, 78;
stepping into a method, 62;
stepping out of a method, 62;
subtracting amount from a variable, 98;
testing an XML Web service, 590;
throwing an exception, 121;
updating databases with information in disconnected DataSets, 478;
using a simple binding, 478;
using a Stack, 204;
using C# Method Wizard, 62;
using complex binding, 478;
using complex data as Web method parameters and return values, 590;
using database connection, 459;
using forms-based security, 553;
using Visual Studio .NET debugger, 121;
validating an XML file, 497;
validating contents of multiple controls or entire form, 377;
validating contents of single control, 377;
validating user changes to disconnected DataSet, 478;
viewing and editing Web form definition, 522;
viewing code behind a form, 350;
viewing HTML source code for Web form, 522;
writing a destructor, 259;
writing a method that accepts any number of arguments of a any type, 218;
writing a method that accepts any number of arguments of a given type, 218;
writing an XML file, 497
R
Random class, 200
range, 265
RangeValidator, 525, 527-528
read/write indexers, 283-285
read/write properties, 267-268
reading an XML file, 497
read-only indexers, 284
read-only properties, 267-268, 272
recursion, 185
ref keyword, 152-153
reference types, 147, 160, 184
RegularExpressionValidator, 525
relational operator, 64
releasing resources, 260
remainder operator, 38
Remote Method Invocation (RMI), 574
Repeater control, 570
RequiredFieldValidator, 524
resizing forms, 25-26
restrictions, 193-194, 227-228, 247, 268-269
retrieving data on demand, 543-546
return statements, 47-48, 75
returnType, 46
rhsOperand, 40, 50
round brackets (parentheses), 42
rules, 74-75
runat attributes, 514
running applications, 28
running programs, 27
S
saving changes in a DataSet, 459
scalability, 253, 502, 521
schemas, WSDL, 576-577, 595
scope, 51-54, 85, 168, 246
sealed classes, 233, 242
sealed methods, 233-234
security, forms-based, 534-539
semantics, 30, 126
semicolons, 84
serialization, 583
server applications, 503
server controls, 513-517, 522
servers, 513-514, 524-531, 545
set accessors, 266, 271, 282
setting arithmetic operators, 38-
sharing information, 52-53
shiftwise operators, 280
short circuiting, 66
showBoolValue method, 37
showDoubleValue method, 37
showFloatValue method, 35-36
showIntValue method, 36
ShowMessageBox property, 530
signature, 222
Simple Object Access Protocol (SOAP), 575-576, 580
slash, 43
sln files, 6
smart methods, 293
Solution Explorer, 5-6
Sort property, 558
SortedList class, 197
sorting a DataGrid, 555-570
sorting data, 571
source code, 37
source files, 108
special methods, 21, 129-130
square brackets, 42, 183
Stack class, 196
stack, 156, 167, 173
Start Without Debugging, 9-10
state, 503, 521
statements, 29-30, 68, 74, 81
static keyword, 140
static methods, 139-140, 300
static properties, 269-271
step-by-step examples,
adding a RangeValidator control, 527-528;
adding an implicit conversion operator, 324-325;
adding Navigation button to application, 565-566;
adding XML comments to code, 15;
arithmetic operators, 39-40;
binding the DataGrid, 560-561;
building and running console application, 9-10;
building login form, 535-538;
calling a params array method, 215-216;
calling an indexer, 289-290;
calling methods, 58-59;
changing control properties, 24-25;
coding OK button, 26;
compiling via command line, 11;
configuring application to use forms-based security, 538-539;
creating a new ASP.NET Web application, 506;
creating a Web service, 578-579, 596-597;
creating and using a struct type, 178-181;
creating and using enumeration types, 169-170;
creating buttons, 547-549;
creating console application, 4-5;
creating Product Categories application, 565;
creating Product Info application, 559-560;
creating Products Web form, 567-568;
creating user interface, 20;
creating Web service client application, 593-599;
defining a Product class, 584-587;
defining and testing a Web method, 580-583, 587-589;
digital clock application, 300-302, 307-308;
displaying column as check box, 561-562;
displaying iteration statements, 86-88;
displaying primitive data type values, 34-35;
displaying products that match specified categories, 568-569;
examining method calls, 51;
examining method definitions, 48-49;
forms-based security, 535;
implementing client validation, 525-527;
inheritance hierarchy, 234-239;
laying out a Web form, 506-513;
laying out CustomerData form, 539-542;
MathsOperators program code, 40-41;
modifying DataGrid to use paging, 543-546;
populating DataGrid and displaying data, 542-543;
reorganize DataGrid columns, 562;
resizing forms, 25-26;
running Windows program, 27;
specifying method declaration syntax, 46;
stepping through a do statement, 94-97;
throwing exceptions, 114;
using checked expressions, 108-112;
using collection classes to play cards, 198-203;
using directives, 13-14;
using indexers in Windows applications, 287-291;
using IntelliSense technology, 7-8;
using Method Wizard, 54-58;
using primitive data types in code, 35-37;
using properties, 273-276;
using the stack and the heap, 156-157;
using value and reference parameters, 149-152, 154-155;
Windows forms, 19-27;
writing a catch handler for your exception, 116-118;
writing a do statement, 91-94;
writing a params array method, 212-215;
writing a try / catch statement, 103-106;
writing a while statement, 88-91;
writing an indexer, 288-289;
writing and calling instance methods, 137-139;
writing constructors and creating objects, 132-137;
writing if statements, 70-73;
writing operator+ overloads, 319-321;
writing static members and calling static methods, 141-144;
writing switch statements, 76-77;
writing using statements, 256-259
stepping into methods, 59-61
stepping out of methods, 59-61
string values, 38, 74
strings, 80
struct types, 170
structification, 270
structs, 9, 242, 253-254, 319
style, changing appearance of elements, 559; explicit statement blocks, 84; menus, 351-352; naming conventions for identifiers, 132; naming conventions, 195, 265; parameter naming conventions, 313
subscribing and unsubscribing to an event, 303-304
subtractValues method, 41
suppressing client validation, 527
switch statements, 73-77, 115
symmetric operators, 314-315
symmetric operators, 323-324
syntax, boxing and unboxing, 159-160; C#, 30; case labels, 75; catch handlers, 103; compound assignment operators, 80; declaring an interface, 227; delegate instances, 299-300; disposal using statements, 252-259; do statements, 85; encapsulation, 126; for statements, 83; if and else statements, 67; if statement errors, 69; inheritance-related, 220; initializing array variables, 186; multiple interfaces, 240; operator precedence, 42; overloading operators, 313; specifying method call, 50-51; specifying method declaration, 46-48; static properties, 269-271; structs and classes, 171; switch statements, 73-77; using name of class to declare a variable, 129; while statements, 81
system messages, 14, 105
System namespace, 158
System.ArgumentOutOfRangeException, 113
System.Array class, 191
System.Collections namespace, 192
System.Delegate class, 296
System.Int32.Parse method, 101, 105-106
System.Object class, 158
System.Object class, 220
System.Runtime.Serialization namespace, 584
System.Web.Security namespace, 537
System.Xml.Serialization namespace, 584
T
tables, C# reserved identifiers, 31; differences between structs and classes, 172; equality and relational operators, 64; keyword combinations, 242; operator precedence and associativity, 66-67; primitive data types, 34; primitive types and equivalent structs/classes, 178
termination condition, 83, 187
testing, 517, 581-583
text box, 531
Text property, 41
TextBox type, 40
TextReader class, 90
threads, 249
throw keyword, 113
throw statements, 75, 113
throwing exceptions, 107, 112-114, 121
tilde, 247
toolbar, 5, 59
ToString method, 41, 168
translation, 248, 254
translation, 266
transmitting data, 584
try blocks, 100-101, 119, 581
type conversions, 209
U
unary operators, 64, 81-83, 312
unassigned local variables, 33
unboxing, 160, 192
unchecked keyword, 107
unreachable objects, 249
updating databases with information in disconnected DataSets, 478
updating rows of data, 549
updating the database, 550-552
URLs, 579, 592
user-defined conversion operators, 322
users, 534-539
using a simple binding, 478
using complex binding, 478
using database connection, 459
using databases, 441-460
using directives, 13, 21
using statements, 252-259
using statements, 515, 580, 599
V
validating an XML file, 497
validating contents of multiple controls or entire form, 377
validating contents of single control, 377
validating data, 365-377
validating events, 523
validating user changes to disconnected DataSet, 478
validation, 523-525
ValidationSummary control, 528-530
value types, 147, 160, 167-170
values, assigning to bool data type, 64-65; compared to objects, 245-246; comparing quick reference, 78; determining operator, 38-39; instance of a primitive type, 130; literal, 129; string, 38, 74
variables, adding to and subtracting from quick references, 98; comparison of primitive types and class types, 129
131; compound assignment statements, 80; declaring, 32-33, 148; for statement scope, 85; global and errors, 100; incrementing and decrementing quick references, 98; incrementing and decrementing, 81-83; instance, 140; lhsOperand and rhsOperand, 40; naming, 31-32; object, 158-159; scope, 51-54; static, 140; struct, 173; throwing exceptions, 115
variadic method, 206
viewing code behind a form, 350
virtual implementation, 286
virtual keyword, 272
virtual methods, 224-225, 272
Visual Basic programming language, default arguments, 54; global methods, 46; keywords, 47
Visual Designer, 19-27
void keyword, 46-47
W
Web applications, 522
Web forms, 505, 533-540, 564-570
Web methods, 590, 598
Web Service Discovery (DISCO), 595
Web services, 573=590
Web Services Description Language (WSDL), 576, 592, 595
WebMethod attribute, 580
while statements, 81-83
widening conversion, 322
widening data, 209
Windows application, 28
Windows Explorer, 12
Windows forms application, 19-27
Windows forms, 329-350
Windows, 405-420
World Wide Web (WWW), 502-505
WriteLine method, 53, 206
write-only indexers, 284
write-only properties, 268, 272
writing, 6, 47-48, 88-91, 497
X
XML (eXtensible Markup Language), adding reference to Web service, 594-595; building Web services, 573-590; creating and testing a Web service quick references, 590; documentation quick reference, 28; handling basics, 479-497; markup example, 576-578; SOAP, 575-576; switch statements, 76-77; tags, 15; using for documentation, 14-19
Last Updated: January 10, 2002
|