|
Visual Basic .NET for Experienced Programmers |
|
|
|
Table of Contents ©
1992-2005. Deitel & Associates, Inc. All Rights Reserved.
|
|
|
Illustrations |
xvi |
|
|
Preface |
xxxi |
|
1 |
Introduction to .NET
and Visual Basic .NET |
1 |
|
1.1 |
Introduction |
2 |
|
1.2 |
History
of the Internet and World Wide Web |
2 |
|
1.3 |
World
Wide Web Consortium (W3C) |
4 |
|
1.4 |
Extensible Markup Language (XML) |
4 |
|
1.5 |
Key
Software Trend: Object Technology |
5 |
|
1.6 |
Introduction to Microsoft .NET |
7 |
|
1.7 |
Visual
Basic .NET |
9 |
|
1.8 |
C, C++,
Java™ and C# |
10 |
|
1.9 |
.NET
Framework and the Common Language Runtime |
11 |
|
1.10 |
Tour of
the Book |
12 |
|
1.11 |
Summary |
19 |
|
1.12 |
Internet
and World Wide Web Resources |
21 |
|
2 |
Introduction to the
Visual Studio IDE and VB .NET Programming |
23 |
|
2.1 |
Introduction |
24 |
|
2.2 |
Visual
Studio .NET Integrated Development Environment (IDE) Overview |
25 |
|
2.3 |
Menu Bar
and Toolbar |
28 |
|
2.4 |
Visual
Studio .NET Windows |
30 |
|
2.4.1 |
Solution Explorer |
30 |
|
2.4.2 |
Toolbox |
31 |
|
2.4.3 |
Properties Window |
31 |
|
2.5 |
Using
Help |
34 |
|
2.6 |
Simple
Program: Displaying Text and an Image |
35 |
|
2.7 |
Simple
Program: Printing a Line of Text |
45 |
|
2.8 |
Arithmetic |
56 |
|
2.9 |
Decision
Making: Equality and Relational Operators |
58 |
|
2.10 |
Summary |
61 |
|
3 |
Control Structures |
63 |
|
3.1 |
Introduction |
64 |
|
3.2 |
Control
Structures |
64 |
|
3.3 |
If/Then Selection Structure |
66 |
|
3.4 |
If/Then/Else Selection Structure |
66 |
|
3.5 |
While Repetition Structure |
67 |
|
3.6 |
Do While/Loop Repetition Structure |
67 |
|
3.7 |
Do Until/Loop Repetition Structure |
67 |
|
3.8 |
Do/Loop While Repetition Structure |
68 |
|
3.9 |
Do/Loop Until Repetition Structure |
68 |
|
3.10 |
Assignment Operators |
68 |
|
3.11 |
For/Next Repetition Structure |
69 |
|
3.12 |
Example:
Using the
For/Next Structure to Compute Compound Interest |
70 |
|
3.13 |
Select
Case Multiple-Selection Structure |
75 |
|
3.14 |
Using
the
Exit Keyword in a Repetition Structure |
78 |
|
3.15 |
Logical
Operators |
80 |
|
3.16 |
Introduction to Windows Application Programming |
86 |
|
3.17 |
Summary |
94 |
|
4 |
Procedures and Arrays |
95 |
|
4.1 |
Introduction |
96 |
|
4.2 |
Modules,
Classes and Procedures |
97 |
|
4.3 |
Sub
Procedures |
97 |
|
4.4 |
Function
Procedures |
100 |
|
4.5 |
Methods |
101 |
|
4.6 |
Argument
Promotion |
104 |
|
4.7 |
Option
Strict and Data-Type Conversions |
106 |
|
4.8 |
Value
Types and Reference Types |
108 |
|
4.9 |
Passing
Arguments: Pass-by-Value vs. Pass-by-Reference |
109 |
|
4.10 |
Duration
of Identifiers |
111 |
|
4.11 |
Scope
Rules |
112 |
|
4.12 |
Recursion |
115 |
|
4.13 |
Procedure Overloading and Optional Arguments |
118 |
|
4.13.1 |
Procedure Overloading |
118 |
|
4.13.2 |
Optional
Arguments |
120 |
|
4.14 |
Modules |
123 |
|
4.15 |
Arrays |
125 |
|
4.16 |
Passing
Arrays to Procedures |
128 |
|
4.17 |
Passing
Arrays:
ByVal vs.
ByRef |
131 |
|
4.18 |
Multidimensional Rectangular and Jagged Arrays |
136 |
|
4.19 |
For
Each/Next Repetition Structure |
140 |
|
4.20 |
Summary |
141 |
|
5 |
Object-Based
Programming |
143 |
|
5.1 |
Introduction |
144 |
|
5.2 |
Implementing a Time Abstract Data Type with a Class |
145 |
|
5.3 |
Class
Scope |
153 |
|
5.4 |
Controlling Access to Members |
153 |
|
5.5 |
Initializing Class Objects: Constructors |
155 |
|
5.6 |
Using
Overloaded Constructors |
155 |
|
5.7 |
Properties |
161 |
|
5.8 |
Composition: Objects as Instance Variables of Other Classes |
168 |
|
5.9 |
Using
the
Me Reference |
171 |
|
5.10 |
Garbage
Collection |
173 |
|
5.11 |
Shared
Class Members |
174 |
|
5.12 |
Const
and
ReadOnly Members |
178 |
|
5.13 |
Data
Abstraction and Information Hiding |
181 |
|
5.14 |
Software
Reusability |
182 |
|
5.15 |
Namespaces and Assemblies |
183 |
|
5.16 |
Class View
and
Object Browser |
187 |
|
5.17 |
Summary |
188 |
|
6 |
Object-Oriented
Programming: Inheritance |
191 |
|
6.1 |
Introduction |
192 |
|
6.2 |
Base
Classes and Derived Classes |
193 |
|
6.3 |
Protected
and
Friend Members |
196 |
|
6.4 |
Relationship Between Base Classes and Derived Classes |
196 |
|
6.5 |
Case
Study: Three-Level Inheritance Hierarchy |
214 |
|
6.6 |
Constructors and Finalizers in Derived Classes |
218 |
|
6.7 |
Software
Engineering with Inheritance |
224 |
|
6.8 |
Summary |
225 |
|
7 |
Object-Oriented
Programming: Polymorphism |
227 |
|
7.1 |
Introduction |
228 |
|
7.2 |
Derived-Class-Object to Base-Class-Object Conversion |
228 |
|
7.3 |
Type
Fields and
Select
Case Statements |
235 |
|
7.4 |
Polymorphism Examples |
236 |
|
7.5 |
Abstract
Classes and Methods |
237 |
|
7.6 |
Case
Study: Inheriting Interface and Implementation |
239 |
|
7.7 |
NotInheritable
Classes and
NotOverridable Methods |
247 |
|
7.8 |
Case
Study: Payroll System Using Polymorphism |
248 |
|
7.9 |
Case
Study: Creating and Using Interfaces |
258 |
|
7.10 |
Delegates |
271 |
|
7.11 |
Summary |
277 |
|
8 |
Exception Handling |
278 |
|
8.1 |
Introduction |
279 |
|
8.2 |
Exception Handling Overview |
280 |
|
8.3 |
Example:
DivideByZeroException |
283 |
|
8.4 |
.NET
Exception Hierarchy |
287 |
|
8.5 |
Finally
Block |
289 |
|
8.6 |
Exception
Properties |
296 |
|
8.7 |
Programmer-Defined Exception Classes |
301 |
|
8.8 |
Handling
Overflows |
305 |
|
8.9 |
Summary |
307 |
|
9 |
Graphical User
Interface Concepts: Part 1 |
309 |
|
9.1 |
Introduction |
310 |
|
9.2 |
Windows
Forms |
312 |
|
9.3 |
Event-Handling Model |
314 |
|
9.4 |
Control
Properties and Layout |
321 |
|
9.5 |
Labels,
TextBoxes
and Buttons |
325 |
|
9.6 |
GroupBoxes
and Panels |
328 |
|
9.7 |
CheckBoxes
and
RadioButtons |
331 |
|
9.8 |
PictureBoxes |
342 |
|
9.9 |
Mouse-Event Handling |
344 |
|
9.10 |
Keyboard-Event Handling |
347 |
|
9.11 |
Summary |
351 |
|
10 |
Graphical User
Interface Concepts: Part 2 |
353 |
|
10.1 |
Introduction |
354 |
|
10.2 |
Menus |
354 |
|
10.3 |
LinkLabels |
364 |
|
10.4 |
ListBoxes
and
CheckedListBoxes |
368 |
|
10.4.1 |
ListBoxes |
370 |
|
10.4.2 |
CheckedListBoxes |
372 |
|
10.5 |
ComboBoxes |
375 |
|
10.6 |
TreeViews |
380 |
|
10.7 |
ListViews |
385 |
|
10.8 |
Tab
Control |
392 |
|
10.9 |
Multiple-Document-Interface (MDI) Windows |
397 |
|
10.10 |
Visual
Inheritance |
406 |
|
10.11 |
User-Defined Controls |
410 |
|
10.12 |
Summary |
415 |
|
11 |
Multithreading |
417 |
|
11.1 |
Introduction |
418 |
|
11.2 |
Thread
States: Life Cycle of a Thread |
420 |
|
11.3 |
Thread
Priorities and Thread Scheduling |
421 |
|
11.4 |
Thread
Synchronization and Class
Monitor |
426 |
|
11.5 |
Producer/Consumer Relationship without Thread Synchronization |
428 |
|
11.6 |
Producer/Consumer Relationship with Thread Synchronization |
434 |
|
11.7 |
Producer/Consumer Relationship: Circular Buffer |
443 |
|
11.8 |
Summary |
453 |
|
12 |
Strings, Characters and
Regular Expressions |
455 |
|
12.1 |
Introduction |
456 |
|
12.2 |
Fundamentals of Characters and Strings |
456 |
|
12.3 |
String
Constructors |
457 |
|
12.4 |
String
Length and
Chars Properties, and
CopyTo Method |
459 |
|
12.5 |
Comparing
Strings |
461 |
|
12.6 |
String Method
GetHashCode |
465 |
|
12.7 |
Locating
Characters and Substrings in
Strings |
466 |
|
12.8 |
Extracting Substrings from
Strings |
469 |
|
12.9 |
Concatenating
Strings |
470 |
|
12.10 |
Miscellaneous
String Methods |
471 |
|
12.11 |
Class
StringBuilder |
473 |
|
12.12 |
StringBuilder
Indexer,
Length and
Capacity Properties, and
EnsureCapacity Method |
|
|
12.13 |
StringBuilder Append and
AppendFormat Methods |
476 |
|
12.14 |
StringBuilder Insert,
Remove and
Replace Methods |
479 |
|
12.15 |
Char
Methods |
482 |
|
12.16 |
Card
Shuffling and Dealing Simulation |
485 |
|
12.17 |
Regular
Expressions and Class
Regex |
489 |
|
12.18 |
Summary |
499 |
|
13 |
Graphics and Multimedia |
501 |
|
13.1 |
Introduction |
502 |
|
13.2 |
Graphics
Contexts and Graphics Objects |
504 |
|
13.3 |
Color
Control |
505 |
|
13.4 |
Font
Control |
512 |
|
13.5 |
Drawing
Lines, Rectangles and Ovals |
517 |
|
13.6 |
Drawing
Arcs |
520 |
|
13.7 |
Drawing
Polygons and Polylines |
523 |
|
13.8 |
Advanced
Graphics Capabilities |
527 |
|
13.9 |
Introduction to Multimedia |
532 |
|
13.10 |
Loading,
Displaying and Scaling Images |
532 |
|
13.11 |
Animating a Series of Images |
534 |
|
13.12 |
Windows
Media Player |
547 |
|
13.13 |
Microsoft Agent |
549 |
|
13.14 |
Summary |
563 |
|
14 |
Files and Streams |
565 |
|
14.1 |
Introduction |
566 |
|
14.2 |
Data
Hierarchy |
566 |
|
14.3 |
Files
and Streams |
568 |
|
14.4 |
Classes
File and
Directory |
570 |
|
14.5 |
Creating
a Sequential-Access File |
580 |
|
14.6 |
Reading
Data from a Sequential-Access File |
591 |
|
14.7 |
Random-Access Files |
602 |
|
14.8 |
Creating
a Random-Access File |
607 |
|
14.9 |
Writing
Data Randomly to a Random-Access File |
610 |
|
14.10 |
Reading
Data Sequentially from a Random-Access File |
615 |
|
14.11 |
Case
Study: A Transaction-Processing Program |
620 |
|
14.12 |
Summary |
640 |
|
15 |
Extensible Markup
Language (XML) |
642 |
|
15.1 |
Introduction |
643 |
|
15.2 |
XML
Documents |
643 |
|
15.3 |
XML
Namespaces |
648 |
|
15.4 |
Document
Object Model (DOM) |
651 |
|
15.5 |
Document
Type Definitions (DTDs), Schemas and Validation |
669 |
|
15.5.1 |
Document
Type Definitions |
670 |
|
15.5.2 |
Microsoft XML Schemas |
674 |
|
15.6 |
Extensible Stylesheet Language and
XslTransform |
679 |
|
15.7 |
Microsoft BizTalk™ |
686 |
|
15.8 |
Summary |
689 |
|
15.9 |
Internet
and World Wide Web Resources |
690 |
|
16 |
Database, SQL and
ADO .NET |
692 |
|
16.1 |
Introduction |
693 |
|
16.2 |
Relational Database Model |
694 |
|
16.3 |
Relational Database Overview:
Books Database |
695 |
|
16.4 |
Structured Query Language (SQL) |
701 |
|
16.4.1 |
Basic
SELECT Statement |
702 |
|
16.4.2 |
WHERE
Clause |
703 |
|
16.4.3 |
ORDER BY Clause |
706 |
|
16.4.4 |
Merging
Data from Multiple Tables:
INNER JOIN |
708 |
|
16.4.5 |
Joining
Data from Tables
Authors,
AuthorISBN,
Titles and
Publishers |
|
|
16.4.6 |
INSERT
Statement |
714 |
|
16.4.7 |
UPDATE
Statement |
715 |
|
16.4.8 |
DELETE
Statement |
716 |
|
16.5 |
ADO .NET
Object Model |
717 |
|
16.6 |
Programming with ADO .NET: Extracting Information from a Database |
718 |
|
16.6.1 |
Connecting to and Querying an Access Data Source |
718 |
|
16.6.2 |
Querying
the Books Database |
726 |
|
16.7 |
Programming with ADO .NET: Modifying a Database |
728 |
|
16.8 |
Reading
and Writing XML Files |
737 |
|
16.9 |
Summary |
740 |
|
17 |
ASP .NET, Web Forms and
Web Controls |
742 |
|
17.1 |
Introduction |
743 |
|
17.2 |
Simple
HTTP Transaction |
744 |
|
17.3 |
System
Architecture |
746 |
|
17.4 |
Creating
and Running a Simple Web-Form Example |
747 |
|
17.5 |
Web
Controls |
759 |
|
17.5.1 |
Text and
Graphics Controls |
759 |
|
17.5.2 |
AdRotator
Control |
765 |
|
17.5.3 |
Validation Controls |
770 |
|
17.6 |
Session
Tracking |
780 |
|
17.6.1 |
Cookies |
781 |
|
17.6.2 |
Session
Tracking with
HttpSessionState |
790 |
|
17.7 |
Case
Study: Online Guest book |
799 |
|
17.8 |
Case
Study: Connecting to a Database in ASP .NET |
805 |
|
17.9 |
Tracing |
820 |
|
17.10 |
Summary |
822 |
|
17.11 |
Internet
and Web Resources |
824 |
|
18 |
ASP .NET and Web
Services |
825 |
|
18.1 |
Introduction |
826 |
|
18.2 |
Web
Services |
827 |
|
18.3 |
Simple
Object Access Protocol (SOAP) and Web Services |
831 |
|
18.4 |
Publishing and Consuming Web Services |
832 |
|
18.5 |
Session
Tracking in Web Services |
847 |
|
18.6 |
Using
Web Forms and Web Services |
860 |
|
18.7 |
Case
Study: Temperature Information Application |
866 |
|
18.8 |
User-Defined Types in Web Services |
875 |
|
18.9 |
Summary |
885 |
|
18.10 |
Internet
and Web Resources |
886 |
|
19 |
Networking:
Streams-Based Sockets and Datagrams |
887 |
|
19.1 |
Introduction |
888 |
|
19.2 |
Establishing a Simple Server (Using Stream Sockets) |
889 |
|
19.3 |
Establishing a Simple Client (Using Stream Sockets) |
891 |
|
19.4 |
Client/Server Interaction via Stream-Socket Connections |
892 |
|
19.5 |
Connectionless Client/Server Interaction via Datagrams |
901 |
|
19.6 |
Client/Server Tic-Tac-Toe Using a Multithreaded Server |
907 |
|
19.7 |
Summary |
922 |
|
20 |
Data Structures and
Collections |
924 |
|
20.1 |
Introduction |
925 |
|
20.2 |
Self-Referential Classes |
925 |
|
20.3 |
Linked
Lists |
927 |
|
20.4 |
Stacks |
940 |
|
20.5 |
Queues |
944 |
|
20.6 |
Trees |
948 |
|
20.6.1 |
Binary
Search Tree of
Integer Values |
949 |
|
20.6.2 |
Binary
Search Tree of
IComparable Objects |
956 |
|
20.7 |
Collection Classes |
963 |
|
20.7.1 |
Class
Array |
964 |
|
20.7.2 |
Class
ArrayList |
967 |
|
20.7.3 |
Class
Stack |
973 |
|
20.7.4 |
Class
Hashtable |
977 |
|
20.8 |
Summary |
983 |
|
21 |
Mobile Internet Toolkit |
985 |
|
21.1 |
Introduction |
986 |
|
21.2 |
Mobile
Internet Toolkit Client Devices |
986 |
|
21.3 |
Introduction to the Microsoft Mobile Internet Toolkit and Microsoft Mobile
Web Forms |
|
|
21.4 |
Advanced
Mobile Web Forms Controls |
1003 |
|
21.5 |
Example:
Deitel Wireless Portal |
1010 |
|
21.6 |
Device-Independent Web Design Using Stylesheets and Templates |
1015 |
|
21.7 |
Consuming a Web Service from a Mobile Application |
1029 |
|
21.8 |
Summary |
1034 |
|
21.9 |
Internet
and Web Resources |
1035 |
|
A |
Operator Precedence
Chart |
1036 |
|
B |
Visual Studio .NET
Debugger |
1038 |
|
B.1 |
Introduction |
1039 |
|
B.2 |
Breakpoints |
1040 |
|
B.3 |
Examining Data |
1042 |
|
B.4 |
Program
Control |
1044 |
|
B.5 |
Additional Procedure Debugging Capabilities |
1048 |
|
B.6 |
Additional Class Debugging Capabilities |
1050 |
|
B.7 |
Summary |
1053 |
|
C |
ASCII Character Set |
1054 |
|
D |
Unicode® |
1055 |
|
D.1 |
Introduction |
1056 |
|
D.2 |
Unicode
Transformation Formats |
1057 |
|
D.3 |
Characters and Glyphs |
1058 |
|
D.4 |
Advantages/Disadvantages of Unicode |
1059 |
|
D.5 |
Unicode
Consortium’s Web Site |
1059 |
|
D.6 |
Using
Unicode |
1060 |
|
D.7 |
Character Ranges |
1062 |
|
D.8 |
Summary |
1063 |
|
|
Bibliography |
1065 |
|
|
Index |
1069 |
|
[ top ]
© 1992-2005. Deitel & Associates, Inc. All Rights Reserved.
|