About the Author |
|
xi | |
Acknowledgments |
|
xiii | |
Preface |
|
xv | |
Introduction |
|
xvii | |
|
|
1 | (30) |
|
|
8 | (4) |
|
The Rise of the Modern Programmer |
|
|
12 | (6) |
|
Killing Bugs Is Just a Game |
|
|
15 | (3) |
|
Dissecting a Bug: Definition |
|
|
18 | (10) |
|
|
22 | (3) |
|
Code Follow-Through: Tracing |
|
|
25 | (2) |
|
Syntactically Incorrect Code |
|
|
27 | (1) |
|
|
28 | (1) |
|
|
28 | (3) |
|
|
28 | (3) |
|
2 Writing Bug-Free Code Part I: The Design Process |
|
|
31 | (14) |
|
Planning Your Bug-Free Project |
|
|
32 | (12) |
|
|
34 | (3) |
|
Identify the Flow of the Application |
|
|
37 | (3) |
|
Identify Internal and External Components |
|
|
40 | (3) |
|
Account Application: Internal and External Components |
|
|
42 | (1) |
|
Create a Realistic Timeline |
|
|
43 | (1) |
|
|
44 | (1) |
|
|
44 | (1) |
|
3 Bug-Free Code Part II: The Coding Process |
|
|
45 | (44) |
|
It Is All in the Comments |
|
|
46 | (2) |
|
Comment Characters of Multiple Languages |
|
|
48 | (1) |
|
|
49 | (14) |
|
|
56 | (7) |
|
|
63 | (13) |
|
|
76 | (5) |
|
|
77 | (1) |
|
|
78 | (3) |
|
Functions, Subroutines, and Methods |
|
|
81 | (5) |
|
|
81 | (5) |
|
|
86 | (1) |
|
|
87 | (1) |
|
|
88 | (1) |
|
4 Throwing Custom Exceptions |
|
|
89 | (36) |
|
Unstructured Error Handling |
|
|
90 | (23) |
|
Structured Error Handling |
|
|
113 | (7) |
|
|
120 | (2) |
|
|
122 | (1) |
|
|
123 | (2) |
|
|
125 | (36) |
|
Benefits of Removing Bugs at Design Time |
|
|
126 | (2) |
|
Debugging in Visual Studio 2003 |
|
|
128 | (12) |
|
|
131 | (6) |
|
|
137 | (3) |
|
Visual Basic Debug Mode Editing |
|
|
140 | (20) |
|
|
142 | (1) |
|
|
142 | (2) |
|
|
144 | (4) |
|
Command Window/Immediate Window |
|
|
148 | (2) |
|
|
150 | (1) |
|
Compiler-Generated Errors |
|
|
150 | (10) |
|
|
160 | (1) |
|
|
160 | (1) |
|
6 Debugging and Visual Studio 2005 |
|
|
161 | (54) |
|
Debugging with the New Features in Visual Studio 2005 |
|
|
161 | (10) |
|
|
162 | (9) |
|
|
171 | (26) |
|
|
176 | (10) |
|
|
186 | (5) |
|
|
191 | (3) |
|
|
194 | (1) |
|
|
195 | (2) |
|
|
197 | (17) |
|
|
200 | (10) |
|
|
210 | (1) |
|
Unused Variable Notification |
|
|
211 | (3) |
|
|
214 | (1) |
|
|
214 | (1) |
|
|
215 | (20) |
|
|
216 | (7) |
|
Setting Up the Test Environment |
|
|
223 | (7) |
|
|
230 | (3) |
|
|
233 | (1) |
|
|
234 | (1) |
|
|
234 | (1) |
|
8 Commenting Your Code with XML |
|
|
235 | (8) |
|
|
236 | (6) |
|
|
242 | (1) |
|
|
242 | (1) |
|
9 Real-World Scenarios: Opening Files |
|
|
243 | (16) |
|
|
245 | (1) |
|
Executing the Close Method in the Wrong Place |
|
|
246 | (3) |
|
Other Syntactical/File Navigation Errors |
|
|
249 | (10) |
10 Real-World Scenarios: Reading Files |
|
259 | (18) |
|
Opening a File as the Incorrect Type |
|
|
259 | (18) |
|
|
260 | (1) |
|
|
260 | (1) |
|
|
260 | (1) |
|
|
260 | (17) |
11 Real-World Scenarios: Saving Program Settings |
|
277 | (8) |
|
Reading from the App.config Incorrectly |
|
|
277 | (8) |
12 Real-World Scenarios: Working with Objects |
|
285 | (14) |
|
Not Defining the Object Correctly |
|
|
286 | (7) |
|
Not Being Able to See an Object from All Forms |
|
|
293 | (6) |
13 Real-World Scenarios: Editing the Registry |
|
299 | (6) |
|
Using SaveSetting and GetSetting |
|
|
300 | (5) |
14 Real-World Scenarios: Window's Termination Functionality |
|
305 | (12) |
15 Real-World Scenarios: Opening a Database |
|
317 | (50) |
|
Passing String Credentials |
|
|
318 | (20) |
|
Obtaining Connection Settings from a .udl File |
|
|
338 | (12) |
|
|
350 | (8) |
|
|
358 | (9) |
16 Real-World Scenarios: Reading a Database |
|
367 | (18) |
|
|
367 | (18) |
17 Real-World Scenarios: Searching a Database |
|
385 | (64) |
|
|
386 | (20) |
|
|
406 | (43) |
Index |
|
449 | |