| | Copyright |
| | |
| | |
| | Chapter 1. Introduction to .NET, Visual Basic and Object Technology |
| | | Section 1.1. Introduction |
| | | Section 1.2. Microsoft's Windows® Operating System |
| | | Section 1.3. Visual Basic |
| | | Section 1.4. The Internet and the World Wide Web |
| | | Section 1.5. Extensible Markup Language (XML) |
| | | Section 1.6. Microsoft's .NET |
| | | Section 1.7. The .NET Framework and the Common Language Runtime |
| | | Section 1.8. Test-Driving a Visual Basic Application |
| | | Section 1.9. (Only Required Section of the Case Study) Software Engineering Case Study: Introduction to Object Technology and the UML |
| | | Section 1.10. Wrap-Up |
| | | Section 1.11. Web Resources |
| | Chapter 2. Introduction to the Visual Basic Express 2005 IDE |
| | | Section 2.1. Introduction |
| | | Section 2.2. Overview of the Visual Studio 2005 IDE |
| | | Section 2.3. Menu Bar and Toolbar |
| | | Section 2.4. Navigating the Visual Studio IDE |
| | | Section 2.5. Using Help |
| | | Section 2.6. Using Visual Programming to Create a Simple Program that Displays Text and an Image |
| | | Section 2.7. Wrap-Up |
| | | Section 2.8. Web Resources |
| | Chapter 3. Introduction to Visual Basic Programming |
| | | Section 3.1. Introduction |
| | | Section 3.2. Displaying a Line of Text |
| | | Section 3.3. Creating A Console Application in Visual Basic Express |
| | | Section 3.4. Displaying a Single Line of Text with Multiple Statements |
| | | Section 3.5. Adding Integers |
| | | Section 3.6. Arithmetic |
| | | Section 3.7. Decision Making: Equality and Relational Operators |
| | | Section 3.8. Using a Message Dialog to Display a Message |
| | | Section 3.9. (Optional) Software Engineering Case Study: Examining the ATM Requirements Document |
| | | Section 3.10. Wrap-Up |
| | | Section 3.11. Web Resources |
| | Chapter 4. Introduction to Classes and Objects |
| | | Section 4.1. Introduction |
| | | Section 4.2. Classes, Objects, Methods and Instance Variables |
| | | Section 4.3. Declaring a Class with a Method and Instantiating an Object of a Class |
| | | Section 4.4. Declaring a Method with a Parameter |
| | | Section 4.5. Instance Variables and Properties |
| | | Section 4.6. Value Types and Reference Types |
| | | Section 4.7. Initializing Objects with Constructors |
| | | Section 4.8. Validating Data with Set Accessors in Properties |
| | | Section 4.9. (Optional) Software Engineering Case Study: Identifying the Classes in the ATM Requirements Document |
| | | Section 4.10. Wrap-Up |
| | Chapter 5. Control Statements: Part 1 |
| | | Section 5.1. Introduction |
| | | Section 5.2. Control Structures |
| | | Section 5.3. If...Then Selection Statement |
| | | Section 5.4. If...Then...Else Selection Statement |
| | | Section 5.5. While Repetition Statement |
| | | Section 5.6. Do While...Loop Repetition Statement |
| | | Section 5.7. Do Until...Loop Repetition Statement |
| | | Section 5.8. Compound Assignment Operators |
| | | Section 5.9. Counter-Controlled Repetition |
| | | Section 5.10. Sentinel-Controlled Repetition |
| | | Section 5.11. Nested Control Statements |
| | | Section 5.12. Nested Repetition Statements |
| | | Section 5.13. Visual Basic Programming in a Windows Application |
| | | Section 5.14. (Optional) Software Engineering Case Study: Identifying Class Attributes in the ATM System |
| | | Section 5.15. Wrap-Up |
| | Chapter 6. Control Statements: Part 2 |
| | | Section 6.1. Introduction |
| | | Section 6.2. Essentials of Counter-Controlled Repetition |
| | | Section 6.3. For...Next Repetition Statement |
| | | Section 6.4. Examples Using the For...Next Statement |
| | | Section 6.5. GradeBook Case Study: Select...Case Multiple-Selection Statement |
| | | Section 6.6. Do...Loop While Repetition Statement |
| | | Section 6.7. Do...Loop Until Repetition Statement |
| | | Section 6.8. Using the Exit Statement in Repetition Statements |
| | | Section 6.9. Using the Continue Statement in Repetition Statements |
| | | Section 6.10. Logical Operators |
| | | Section 6.11. (Optional) Software Engineering Case Study: Identifying Objects' States and Activities in the ATM System |
| | | Software Engineering Case Study Self-Review Exercises |
| | | Section 6.12. Wrap-Up |
| | Chapter 7. Methods: A Deeper Look |
| | | Section 7.1. Introduction |
| | | Section 7.2. Modules, Classes and Methods |
| | | Section 7.3. Subroutines: Methods That Do Not Return a Value |
| | | Section 7.4. Functions: Methods That Return a Value |
| | | Section 7.5. Shared Methods and Class Math |
| | | Section 7.6. GradeBook Case Study: Declaring Methods with Multiple Parameters |
| | | Section 7.7. Notes on Declaring and Using Methods |
| | | Section 7.8. Method Call Stack and Activation Records |
| | | Section 7.9. Implicit Argument Conversions |
| | | Section 7.10. Option Strict and Data-Type Conversions |
| | | Section 7.11. Value Types and Reference Types |
| | | Section 7.12. Framework Class Library Namespaces |
| | | Section 7.13. Passing Arguments: Pass-by-Value vs. Pass-by-Reference |
| | | Section 7.14. Scope of Declarations |
| | | Section 7.15. Case Study: Random Number Generation |
| | | Section 7.16. Case Study: A Game of Chance |
| | | Section 7.17. Method Overloading |
| | | Section 7.18. Optional Parameters |
| | | Section 7.19. Recursion |
| | | Section 7.20. (Optional) Software Engineering Case Study: Identifying Class Operations in the ATM System |
| | | Section 7.21. Wrap-Up |
| | Chapter 8. Arrays |
| | | Section 8.1. Introduction |
| | | Section 8.2. Arrays |
| | | Section 8.3. Declaring and Allocating Arrays |
| | | Section 8.4. Examples Using Arrays |
| | | Section 8.5. Case Study: Card Shuffling and Dealing Simulation |
| | | Section 8.6. Passing an Array to a Method |
| | | Section 8.7. For Each...Next Repetition Statement |
| | | Section 8.8. GradeBook Case Study: Using an Array to Store Grades |
| | | Section 8.9. Rectangular Arrays |
| | | Section 8.10. GradeBook Case Study: Using a Rectangular Array |
| | | Section 8.11. Variable-Length Parameter Lists |
| | | Section 8.12. Jagged Arrays |
| | | Section 8.13. Changing the Size of an Array at Execution Time: Using the ReDim Statement |
| | | Section 8.14. Passing Arrays: ByVal vs. ByRef |
| | | Section 8.15. (Optional) Software Engineering Case Study: Collaboration Among Objects in the ATM System |
| | | Section 8.16. Wrap-Up |
| | Chapter 9. Classes and Objects: A Deeper Look |
| | | Section 9.1. Introduction |
| | | Section 9.2. Time Class Case Study |
| | | Section 9.3. Class Scope |
| | | Section 9.4. Default and Parameterless Constructors |
| | | Section 9.5. Time Class Case Study: Overloaded Constructors |
| | | Section 9.6. Partial Classes |
| | | Section 9.7. Composition |
| | | Section 9.8. Using the Me Reference to Access the Current Object |
| | | Section 9.9. Garbage Collection |
| | | Section 9.10. Shared Class Members |
| | | Section 9.11. Const and ReadOnly Members |
| | | Section 9.12. Object Browser |
| | | Section 9.13. Time Class Case Study: Creating Class Libraries |
| | | Section 9.14. (Optional) Software Engineering Case Study: Starting to Program the Classes of the ATM System |
| | | Section 9.15. Wrap-Up |
| | Chapter 10. Object-Oriented Programming: Inheritance |
| | | Section 10.1. Introduction |
| | | Section 10.2. Base Classes and Derived Classes |
| | | Section 10.3. Protected Members |
| | | Section 10.4. Relationship between Base Classes and Derived Classes |
| | | Section 10.5. Constructors in Derived Classes |
| | | Section 10.6. Software Engineering with Inheritance |
| | | Section 10.7. Class Object |
| | | Section 10.8. Friend Members |
| | | Section 10.9. Wrap-Up |
| | Chapter 11. Object-Oriented Programming: Polymorphism |
| | | Section 11.1. Introduction |
| | | Section 11.2. Polymorphic Video Game |
| | | Section 11.3. Demonstrating Polymorphic Behavior |
| | | Section 11.4. Abstract Classes and Methods |
| | | Section 11.5. Case Study: Payroll System Class Hierarchy Using Polymorphism |
| | | Section 11.6. NotOverridable Methods and NotInheritable Classes |
| | | Section 11.7. Case Study: Creating and Using Interfaces |
| | | Section 11.8. (Optional) Software Engineering Case Study: Incorporating Inheritance and Polymorphism into the ATM System |
| | | Section 11.9. Wrap-Up |
| | Chapter 12. Exception Handling |
| | | Section 12.1. Introduction |
| | | Section 12.2. Exception Handling Overview |
| | | Section 12.3. Example: Divide by Zero Without Exception Handling |
| | | Section 12.4. Example: Handling DivideByZeroExceptions and FormatExceptions |
| | | Section 12.5. .NET Exception Hierarchy |
| | | Section 12.6. Finally Block |
| | | Section 12.7. Exception Properties |
| | | Section 12.8. User-Defined Exception Classes |
| | | Section 12.9. Wrap-Up |
| | Chapter 13. Graphical User Interface Concepts: Part I |
| | | Section 13.1. Introduction |
| | | Section 13.2. Windows Forms |
| | | Section 13.3. Event Handling |
| | | Section 13.4. Control Properties and Layout |
| | | Section 13.5. Labels, TextBoxes and Buttons |
| | | Section 13.6. GroupBoxes and Panels |
| | | Section 13.7. CheckBoxes and RadioButtons |
| | | Section 13.8. PictureBoxes |
| | | Section 13.9. ToolTips |
| | | Section 13.10. NumericUpDown Control |
| | | Section 13.11. Mouse-Event Handling |
| | | Section 13.12. Keyboard-Event Handling |
| | | Section 13.13. Wrap-Up |
| | Chapter 14. Graphical User Interface Concepts: Part 2 |
| | | Section 14.1. Introduction |
| | | Section 14.2. Menus |
| | | Section 14.3. MonthCalendar Control |
| | | Section 14.4. DateTimePicker Control |
| | | Section 14.5. LinkLabel Control |
| | | Section 14.6. ListBox Control |
| | | Section 14.7. CheckedListBox Control |
| | | Section 14.8. ComboBox Control |
| | | Section 14.9. TreeView Control |
| | | Section 14.10. ListView Control |
| | | Section 14.11. TabControl Control |
| | | Section 14.12. Multiple Document Interface (MDI) Windows |
| | | Section 14.13. Visual Inheritance |
| | | Section 14.14. User-Defined Controls |
| | | Section 14.15. Wrap-Up |
| | Chapter 15. Multithreading |
| | | Section 15.1. Introduction |
| | | Section 15.2. Thread States: Life Cycle of a Thread |
| | | Section 15.3. Thread Priorities and Thread Scheduling |
| | | Section 15.4. Creating and Executing Threads |
| | | Section 15.5. Thread Synchronization and Class Monitor |
| | | Section 15.6. Producer/Consumer Relationship without Thread Synchronization |
| | | Section 15.7. Producer/Consumer Relationship with Thread Synchronization |
| | | Section 15.8. Producer/Consumer Relationship: Circular Buffer |
| | | Section 15.9. Multithreading with GUIs |
| | | Section 15.10. Wrap-Up |
| | Chapter 16. Strings, Characters and Regular Expressions |
| | | Section 16.1. Introduction |
| | | Section 16.2. Fundamentals of Characters and Strings |
| | | Section 16.3. String Constructors |
| | | Section 16.4. String Indexer, Length Property and CopyTo Method |
| | | Section 16.5. Comparing Strings |
| | | Section 16.6. Locating Characters and Substrings in Strings |
| | | Section 16.7. Extracting Substrings from Strings |
| | | Section 16.8. Concatenating Strings |
| | | Section 16.9. Miscellaneous String Methods |
| | | Section 16.10. Class StringBuilder |
| | | Section 16.11. Length and Capacity Properties, EnsureCapacity Method and Indexer of Class StringBuilder |
| | | Section 16.12. Append and AppendFormat Methods of Class StringBuilder |
| | | Section 16.13. Insert, Remove and Replace Methods of Class StringBuilder |
| | | Section 16.14. Char Methods |
| | | Section 16.15. Card Shuffling and Dealing Simulation |
| | | Section 16.16. Regular Expressions and Class RegEx |
| | | Section 16.17. Wrap-Up |
| | Chapter 17. Graphics and Multimedia |
| | | Section 17.1. Introduction |
| | | Section 17.2. Drawing Classes and the Coordinate System |
| | | Section 17.3. Graphics Contexts and Graphics Objects |
| | | Section 17.4. Color Control |
| | | Section 17.5. Font Control |
| | | Section 17.6. Drawing Lines, Rectangles and Ovals |
| | | Section 17.7. Drawing Arcs |
| | | Section 17.8. Drawing Polygons and Polylines |
| | | Section 17.9. Advanced Graphics Capabilities |
| | | Section 17.10. Introduction to Multimedia |
| | | Section 17.11. Loading, Displaying and Scaling Images |
| | | Section 17.12. Animating a Series of Images |
| | | Section 17.13. Windows Media Player |
| | | Section 17.14. Microsoft Agent |
| | | Section 17.15. Wrap-Up |
| | Chapter 18. Files and Streams |
| | | Section 18.1. Introduction |
| | | Section 18.2. Data Hierarchy |
| | | Section 18.3. Files and Streams |
| | | Section 18.4. Classes File and Directory |
| | | Section 18.5. Creating a Sequential-Access Text File |
| | | Section 18.6. Reading Data from a Sequential-Access Text File |
| | | Section 18.7. Case Study: A Credit-Inquiry Program |
| | | Section 18.8. Serialization |
| | | Section 18.9. Creating a Sequential-Access File Using Object Serialization |
| | | Section 18.10. Reading and Deserializing Data from a Sequential-Access Text File |
| | | Section 18.11. Wrap-Up |
| | Chapter 19. Extensible Markup Language (XML) |
| | | Section 19.1. Introduction |
| | | Section 19.2. XML Basics |
| | | Section 19.3. Structuring Data |
| | | Section 19.4. XML Namespaces |
| | | Section 19.5. Document Type Definitions (DTDs) |
| | | Section 19.6. W3C XML Schema Documents |
| | | Section 19.7. (Optional) Extensible Stylesheet Language and XSL Transformations |
| | | Section 19.8. (Optional) Document Object Model (DOM) |
| | | Section 19.9. (Optional) Schema Validation with Class XmlReader |
| | | Section 19.10. (Optional) XSLT with Class XslCompiledTransform |
| | | Section 19.11. Wrap-Up |
| | | Section 19.12. Web Resources |
| | Chapter 20. Database, SQL and ADO.NET |
| | | Section 20.1. Introduction |
| | | Section 20.2. Relational Databases |
| | | Section 20.3. Relational Database Overview: Books Database |
| | | Section 20.4. SQL |
| | | Section 20.5. ADO.NET Object Model |
| | | Section 20.6. Programming with ADO.NET: Extracting Information from a Database |
| | | Section 20.7. Querying the Books Database |
| | | Section 20.8. Programming with ADO.NET: Address Book Case Study |
| | | Section 20.9. Using a DataSet to Read and Write XML |
| | | Section 20.10. Wrap-Up |
| | | Section 20.11. Web Resources |
| | Chapter 21. ASP.NET 2.0, Web Forms and Web Controls |
| | | Section 21.1. Introduction |
| | | Section 21.2. Simple HTTP Transactions |
| | | Section 21.3. Multitier Application Architecture |
| | | Section 21.4. Creating and Running a Simple Web-Form Example |
| | | Section 21.5. Web Controls |
| | | Section 21.6. Session Tracking |
| | | Section 21.7. Case Study: Connecting to a Database in ASP.NET |
| | | Section 21.8. Case Study: Secure Books Database Application |
| | | Section 21.9. Wrap-Up |
| | | Section 21.10. Web Resources |
| | Chapter 22. Web Services |
| | | Section 22.1. Introduction |
| | | Section 22.2. .NET Web Services Basics |
| | | Section 22.3. Simple Object Access Protocol (SOAP) |
| | | Section 22.4. Publishing and Consuming Web Services |
| | | Section 22.5. Session Tracking in Web Services |
| | | Section 22.6. Using Web Forms and Web Services |
| | | Section 22.7. User-Defined Types in Web Services |
| | | Section 22.8. Wrap-Up |
| | | Section 22.9. Web Resources |
| | Chapter 23. Networking: Streams-Based Sockets and Datagrams |
| | | Section 23.1. Introduction |
| | | Section 23.2. Connection-Oriented vs. Connectionless Communication |
| | | Section 23.3. Protocols for Transporting Data |
| | | Section 23.4. Establishing a Simple TCP Server Using Stream Sockets |
| | | Section 23.5. Establishing a Simple TCP Client Using Stream Sockets |
| | | Section 23.6. Client/Server Interaction with Stream-Socket Connections |
| | | Section 23.7. Connectionless Client/Server Interaction with Datagrams |
| | | Section 23.8. Client/Server Tic-Tac-Toe Using a Multithreaded Server |
| | | Section 23.9. WebBrowser Class |
| | | Section 23.10. .NET Remoting |
| | | Section 23.11. Wrap-Up |
| | Chapter 24. Data Structures |
| | | Section 24.1. Introduction |
| | | Section 24.2. Primitive-Type Structures; Boxing and Unboxing |
| | | Section 24.3. Self-Referential Classes |
| | | Section 24.4. Linked Lists |
| | | Section 24.5. Stacks |
| | | Section 24.6. Queues |
| | | Section 24.7. Trees |
| | | Section 24.8. Wrap-Up |
| | Chapter 25. Generics |
| | | Section 25.1. Introduction |
| | | Section 25.2. Motivation for Generic Methods |
| | | Section 25.3. Generic Method Implementation |
| | | Section 25.4. Type Constraints |
| | | Section 25.5. Overloading Generic Methods |
| | | Section 25.6. Generic Classes |
| | | Section 25.7. Notes on Generics and Inheritance |
| | | Section 25.8. Wrap-Up |
| | Chapter 26. Collections |
| | | Section 26.1. Introduction |
| | | Section 26.2. Collections Overview |
| | | Section 26.3. Class Array and Enumerators |
| | | Section 26.4. Non-Generic Collections |
| | | Section 26.5. Generic Collections |
| | | Section 26.6. Synchronized Collections |
| | | Section 26.7. Wrap-Up |
| | Appendix A. Operator Precedence Chart |
| | Appendix B. Number Systems |
| | | Section B.1. Introduction |
| | | Section B.2. Abbreviating Binary Numbers as Octal and Hexadecimal Numbers |
| | | Section B.3. Converting Octal and Hexadecimal Numbers to Binary Numbers |
| | | Section B.4. Converting from Binary, Octal or Hexadecimal to Decimal |
| | | Section B.5. Converting from Decimal to Binary, Octal or Hexadecimal |
| | | Section B.6. Negative Binary Numbers: Two's Complement Notation |
| | Appendix C. Using the Visual Studio 2005 Debugger |
| | | Section C.1. Introduction |
| | | Section C.2. Breakpoints and the Continue Command |
| | | Section C.3. The Locals and Watch Windows |
| | | Section C.4. Controlling Execution Using the Step Into, Step Over, Step Out and Continue Commands |
| | | Section C.5. Other Features |
| | | Section C.6. Wrap-Up |
| | Appendix D. ASCII Character Set |
| | Appendix E. Unicode® |
| | | Section E.1. Introduction |
| | | Section E.2. Unicode Transformation Formats |
| | | Section E.3. Characters and Glyphs |
| | | Section E.4. Advantages/Disadvantages of Unicode |
| | | Section E.5. Unicode Consortium's Web Site |
| | | Section E.6. Using Unicode |
| | | Section E.7. Character Ranges |
| | Appendix F. Introduction to XHTML: Part 1 |
| | | Section F.1. Introduction |
| | | Section F.2. Editing XHTML |
| | | Section F.3. First XHTML Example |
| | | Section F.4. W3C XHTML Validation Service |
| | | Section F.5. Headers |
| | | Section F.6. Linking |
| | | Section F.7. Images |
| | | Section F.8. Special Characters and More Line Breaks |
| | | Section F.9. Unordered Lists |
| | | Section F.10. Nested and Ordered Lists |
| | | Section F.11. Web Resources |
| | Appendix G. Introduction to XHTML: Part 2 |
| | | Section G.1. Introduction |
| | | Section G.2. Basic XHTML Tables |
| | | Section G.3. Intermediate XHTML Tables and Formatting |
| | | Section G.4. Basic XHTML Forms |
| | | Section G.5. More Complex XHTML Forms |
| | | Section G.6. Internal Linking |
| | | Section G.7. Creating and Using Image Maps |
| | | Section G.8. meta Elements |
| | | Section G.9. frameset Element |
| | | Section G.10. Nested framesets |
| | | Section G.11. Web Resources |
| | Appendix H. XHTML Special Characters |
| | Appendix I. XHTML Colors |
| | Appendix J. ATM Case Study Code |
| | | Section J.1. ATM Case Study Implementation |
| | | Section J.2. Class ATM |
| | | Section J.3. Class Screen |
| | | Section J.4. Class Keypad |
| | | Section J.5. Class CashDispenser |
| | | Section J.6. Class DepositSlot |
| | | Section J.7. Class Account |
| | | Section J.8. Class BankDatabase |
| | | Section J.9. Class Transaction |
| | | Section J.10. Class BalanceInquiry |
| | | Section J.11. Class Withdrawal |
| | | Section J.12. Class Deposit |
| | | Section J.13. Module ATMCaseStudy |
| | | Section J.14. Wrap-Up |
| | Appendix K. UML 2: Additional Diagram Types |
| | | Section K.1. Introduction |
| | | Section K.2. Additional Diagram Types |
| | Appendix L. Primitive Types |
| | | Additional Primitive Type Information |
| | CD-ROM Warranty |
| | Index |