Visual C# How to Program 6th Edition Deitel Test Bank

$26.99$50.00 (-46%)

In stock

Visual C# How to Program 6th Edition Deitel Test Bank.

Download sample

Visual C# How to Program 6th Edition Deitel Test Bank

Product details:

  • ISBN-10 ‏ : ‎ 9780134601540
  • ISBN-13 ‏ : ‎ 978-0134601540
  • Author: Paul Deitel

Created by world-renowned programming instructors Paul and Harvey Deitel, Visual C# How to Program, Sixth Edition introduces students to the world of desktop, mobile and web app development with Microsoft’s® Visual C#® programming language. Students will use .NET platform and the Visual Studio® Integrated Development Environment to write, test, and debug applications and run them on a wide variety of Windows® devices.

At the heart of the book is the Deitel signature live-code approach―rather than using code snippets, the authors present concepts in the context of complete working programs followed by sample executions. Students begin by getting comfortable with the Visual Studio Community edition IDE and basic C# syntax. Next, they build their skills one step at a time, mastering control structures, classes, objects, methods, variables, arrays, and the core techniques of object-oriented programming. With this strong foundation in place, the authors introduce more sophisticated techniques, including searching, sorting, data structures, generics, and collections. Additional practice is provided through a broad range of example programs and exercises selected from computer science, business, education, social issues, personal utilities, sports, mathematics, puzzles, simulation, game playing, graphics, multimedia and many other areas.

Table contents:

  1. 1 Introduction to Computers, the Internet and Visual C#
  2. Objectives
  3. Outline
  4. 1.1 Introduction
  5. 1.2 Computers and the Internet in Industry and Research
  6. 1.3 Hardware and Software
  7. 1.3.1 Moore’s Law
  8. 1.3.2 Computer Organization
  9. 1.4 Data Hierarchy
  10. 1.5 Machine Languages, Assembly Languages and High-Level Languages
  11. 1.6 Object Technology
  12. 1.7 Internet and World Wide Web
  13. 1.8 C#
  14. 1.8.1 Object-Oriented Programming
  15. 1.8.2 Event-Driven Programming
  16. 1.8.3 Visual Programming
  17. 1.8.4 Generic and Functional Programming
  18. Generic Programming
  19. Functional Programming
  20. 1.8.5 An International Standard
  21. 1.8.6 C# on Non-Windows Platforms
  22. 1.8.7 Internet and Web Programming
  23. 1.8.8 Asynchronous Programming with async and await
  24. 1.8.9 Other Key Programming Languages
  25. 1.9 Microsoft’s .NET
  26. 1.9.1 .NET Framework
  27. 1.9.2 Common Language Runtime
  28. 1.9.3 Platform Independence
  29. 1.9.4 Language Interoperability
  30. 1.10 Microsoft’s Windows® Operating System
  31. 1.11 Visual Studio Integrated Development Environment
  32. 1.12 Painter Test-Drive in Visual Studio Community
  33. Self-Review Exercises
  34. Answers to Self-Review Exercises
  35. Exercises
  36. Making-a-Difference Exercises
  37. Making-a-Difference Resources
  38. 2 Introduction to Visual Studio and Visual Programming
  39. Objectives
  40. Outline
  41. 2.1 Introduction
  42. 2.2 Overview of the Visual Studio Community 2015 IDE
  43. 2.2.1 Introduction to Visual Studio Community 2015
  44. 2.2.2 Visual Studio Themes
  45. 2.2.3 Links on the Start Page
  46. 2.2.4 Creating a New Project
  47. 2.2.5 New Project Dialog and Project Templates
  48. 2.2.6 Forms and Controls
  49. 2.3 Menu Bar and Toolbar
  50. 2.4 Navigating the Visual Studio IDE
  51. 2.4.1 Solution Explorer
  52. 2.4.2 Toolbox
  53. 2.4.3 Properties Window
  54. 2.5 Help Menu and Context-Sensitive Help
  55. 2.6 Visual Programming: Creating a Simple App that Displays Text and an Image
  56. 2.7 Wrap-Up
  57. 2.8 Web Resources
  58. Summary
  59. Section 2.1 Introduction
  60. Section 2.2 Overview of the Visual Studio Community 2015 IDE
  61. Section 2.3 Menu Bar and Toolbar
  62. Section 2.4 Navigating the Visual Studio IDE
  63. Section 2.5 Help Menu and Context-Sensitive Help
  64. Section 2.6 Visual Programming: Creating a Simple App that Displays Text and an Image
  65. Terminology
  66. Self-Review Exercises
  67. Answers to Self-Review Exercises
  68. Exercises
  69. Note Regarding Exercises 2.7–2.11
  70. 3 Introduction to C# App Programming
  71. Objectives
  72. Outline
  73. 3.1 Introduction
  74. 3.2 Simple App: Displaying a Line of Text
  75. 3.2.1 Comments
  76. 3.2.2 using Directive
  77. 3.2.3 Blank Lines and Whitespace
  78. 3.2.4 Class Declaration
  79. Class Name Convention
  80. Class Declaration’s File Name
  81. Body of a Class Declaration
  82. 3.2.5 Main Method
  83. Body of a Method Declaration
  84. 3.2.6 Displaying a Line of Text
  85. Statements
  86. 3.2.7 Matching Left ({) and Right (}) Braces
  87. 3.3 Creating a Simple App in Visual Studio
  88. 3.3.1 Creating the Console App
  89. 3.3.2 Changing the Name of the App File
  90. 3.3.3 Writing Code and Using IntelliSense
  91. 3.3.4 Compiling and Running the App
  92. 3.3.5 Errors, Error Messages and the Error List Window
  93. 3.4 Modifying Your Simple C# App
  94. 3.4.1 Displaying a Single Line of Text with Multiple Statements
  95. 3.4.2 Displaying Multiple Lines of Text with a Single Statement
  96. 3.5 String Interpolation
  97. 3.6 Another C# App: Adding Integers
  98. 3.6.1 Declaring the int Variable number1
  99. 3.6.2 Declaring Variables number2 and sum
  100. 3.6.3 Prompting the User for Input
  101. 3.6.4 Reading a Value into Variable number1
  102. Possible Erroneous User Input
  103. Assigning a Value to a Variable
  104. 3.6.5 Prompting the User for Input and Reading a Value into number2
  105. 3.6.6 Summing number1 and number2
  106. 3.6.7 Displaying the sum with string Interpolation
  107. 3.6.8 Performing Calculations in Output Statements
  108. 3.7 Memory Concepts
  109. 3.8 Arithmetic
  110. 3.8.1 Arithmetic Expressions in Straight-Line Form
  111. 3.8.2 Parentheses for Grouping Subexpressions
  112. 3.8.3 Rules of Operator Precedence
  113. 3.8.4 Sample Algebraic and C# Expressions
  114. Evaluation of a Second-Degree Polynomial
  115. 3.8.5 Redundant Parentheses
  116. 3.9 Decision Making: Equality and Relational Operators
  117. 3.10 Wrap-Up
  118. Summary
  119. Section 3.2.1 Comments
  120. Section 3.2.2 using Directive
  121. Section 3.2.3 Blank Lines and Whitespace
  122. Section 3.2.4 Class Declaration
  123. Section 3.2.5 Main Method
  124. Section 3.2.6 Displaying a Line of Text
  125. Section 3.3.1 Creating the Console App
  126. Section 3.3.3 Writing Code and Using IntelliSense
  127. Section 3.4.1 Displaying a Single Line of Text with Multiple Statements
  128. Section 3.4.2 Displaying Multiple Lines of Text with a Single Statement
  129. Section 3.5 String Interpolation
  130. Section 3.6.1 Declaring the int Variable number1
  131. Section 3.6.3 Prompting the User for Input
  132. Section 3.6.6 Summing number1 and number2
  133. Section 3.7 Memory Concepts
  134. Section 3.8 Arithmetic
  135. Section 3.8.1 Arithmetic Expressions in Straight-Line Form
  136. Section 3.8.2 Parentheses for Grouping Subexpressions
  137. Section 3.8.3 Rules of Operator Precedence
  138. Section 3.8.5 Redundant Parentheses
  139. Section 3.9 Decision Making: Equality and Relational Operators
  140. Terminology
  141. Self-Review Exercises
  142. Answers to Self-Review Exercises
  143. Exercises
  144. Making-a-Difference Exercises
  145. 4 Introduction to Classes, Objects, Methods and strings
  146. Objectives
  147. Outline
  148. 4.1 Introduction
  149. 4.2 Test-Driving an Account Class
  150. 4.2.1 Instantiating an Object—Keyword new
  151. 4.2.2 Calling Class Account’s GetName Method
  152. 4.2.3 Inputting a Name from the User
  153. 4.2.4 Calling Class Account’s SetName Method
  154. Displaying the Name That Was Entered by the User
  155. 4.3 Account Class with an Instance Variable and Set and Get Methods
  156. 4.3.1 Account Class Declaration
  157. 4.3.2 Keyword class and the Class Body
  158. Identifiers and Camel-Case Naming
  159. 4.3.3 Instance Variable name of Type string
  160. null—the Default Initial Value for string Variables
  161. 4.3.4 SetName Method
  162. SetName’s Parameter
  163. SetName Parameter List
  164. SetName Method Body
  165. Parameters Are Local Variables
  166. 4.3.5 GetName Method
  167. 4.3.6 Access Modifiers private and public
  168. Default Access for Class Members
  169. 4.3.7 Account UML Class Diagram
  170. Top Compartment
  171. Middle Compartment
  172. Bottom Compartment
  173. Return Types
  174. Parameters
  175. 4.4 Creating, Compiling and Running a Visual C# Project with Two Classes
  176. 4.5 Software Engineering with Set and Get Methods
  177. 4.6 Account Class with a Property Rather Than Set and Get Methods
  178. 4.6.1 Class AccountTest Using Account’s Name Property
  179. Invoking Class Account’s Name Property to Get the Name
  180. Invoking Class Account’s Name Property to Set the Name
  181. 4.6.2 Account Class with an Instance Variable and a Property
  182. Property Name’s Declaration
  183. Property Name’s get Accessor
  184. Property Name’s set Accessor
  185. 4.6.3 Account UML Class Diagram with a Property
  186. 4.7 Auto-Implemented Properties
  187. 4.8 Account Class: Initializing Objects with Constructors
  188. 4.8.1 Declaring an Account Constructor for Custom Object Initialization
  189. Account Constructor Declaration
  190. Constructor Body
  191. 4.8.2 Class AccountTest: Initializing Account Objects When They’re Created
  192. Default Constructor
  193. There’s No Default Constructor in a Class That Declares a Constructor
  194. Adding the Constructor to Class Account’s UML Class Diagram
  195. 4.9 Account Class with a Balance; Processing Monetary Amounts
  196. 4.9.1 Account Class with a decimal balance Instance Variable
  197. Account Class Two-Parameter Constructor
  198. Account Property Balance
  199. set and get Accessors with Different Access Modifiers
  200. Account Class Deposit Method
  201. 4.9.2 AccountTest Class That Uses Account Objects with Balances
  202. Displaying the Account Objects’ Initial Balances
  203. string Interpolation Expressions with Formatting
  204. Reading a decimal Value from the User
  205. Making a Deposit
  206. Reading a decimal Value and Depositing into account2
  207. Duplicated Code in Method Main
  208. UML Class Diagram for Class Account
  209. 4.10 Wrap-Up
  210. Summary
  211. Section 4.1 Introduction
  212. Section 4.2 Test-Driving an Account Class
  213. Section 4.2.1 Instantiating an Object—Keyword new and Constructors
  214. Section 4.2.2 Calling Class Account’s GetName Method
  215. Section 4.2.3 Inputting a Name from the User
  216. Section 4.2.4 Calling Class Account’s SetName Method
  217. Section 4.3 Account Class with an Instance Variable and Set and Get Methods
  218. Section 4.3.1 Account Class Declaration
  219. Section 4.3.2 Keyword class and the Class Body
  220. Section 4.3.3 Instance Variable name of Type string
  221. Section 4.3.4 SetName Method
  222. Section 4.3.5 GetName Method
  223. Section 4.3.6 Access Modifiers private and public
  224. Section 4.3.7 Account UML Class Diagram
  225. Section 4.4 Creating, Compiling and Running a Visual C# Project with Two Classes
  226. Section 4.5 Software Engineering with Set and Get Methods
  227. Section 4.6 Account Class with a Property Rather Than Set and Get Methods
  228. Section 4.6.1 Class AccountTest Using Account’s Name Property
  229. Section 4.6.2 Account Class with an Instance Variable and a Property
  230. Section 4.6.3 Account UML Class Diagram with a Property
  231. Section 4.7 Auto-Implemented Properties
  232. Section 4.8 Account Class: Initializing Objects with Constructors
  233. Section 4.8.1 Declaring an Account Constructor for Custom Object Initialization
  234. Section 4.8.2 Class AccountTest: Initializing Account Objects When They’re Created
  235. Section 4.9 Account Class with a Balance; Processing Monetary Amounts
  236. Section 4.9.1 Account Class with a decimal balance Instance Variable
  237. Section 4.9.2 AccountTest Class That Creates and Uses Account Objects
  238. Terminology
  239. Self-Review Exercises
  240. Answers to Self-Review Exercises
  241. Exercises
  242. Making-a-Difference Exercises
  243. 5 Algorithm Development and Control Statements: Part 1
  244. Objectives
  245. Outline
  246. 5.1 Introduction
  247. 5.2 Algorithms
  248. 5.3 Pseudocode
  249. 5.4 Control Structures
  250. 5.4.1 Sequence Structure
  251. 5.4.2 Selection Statements
  252. 5.4.3 Iteration Statements
  253. 5.4.4 Summary of Control Statements
  254. 5.5 if Single-Selection Statement
  255. 5.6 if…else Double-Selection Statement
  256. 5.6.1 Nested if…else Statements
  257. 5.6.2 Dangling-else Problem
  258. 5.6.3 Blocks
  259. Syntax and Logic Errors
  260. Empty Statement
  261. 5.6.4 Conditional Operator (?:)
  262. 5.7 Student Class: Nested if…else Statements
  263. 5.8 while Iteration Statement
  264. 5.9 Formulating Algorithms: Counter-Controlled Iteration
  265. 5.9.1 Pseudocode Algorithm with Counter-Controlled Iteration
  266. 5.9.2 Implementing Counter-Controlled Iteration
  267. Local Variables in Main
  268. Initialization Phase: Initializing Variables total and gradeCounter
  269. Processing Phase: Reading 10 Grades from the User
  270. Termination Phase: Calculating and Displaying the Class Average
  271. 5.9.3 Integer Division and Truncation
  272. 5.10 Formulating Algorithms: Sentinel-Controlled Iteration
  273. 5.10.1 Top-Down, Stepwise Refinement: The Top and First Refinement
  274. 5.10.2 Second Refinement
  275. 5.10.3 Implementing Sentinel-Controlled Iteration
  276. 5.10.4 Program Logic for Sentinel-Controlled Iteration
  277. 5.10.5 Braces in a while Statement
  278. 5.10.6 Converting Between Simple Types Explicitly and Implicitly
  279. Cast Operator
  280. Promotions
  281. Cast Operators for Any Type
  282. 5.10.7 Formatting Floating-Point Numbers
  283. Rounding Floating-Point Numbers
  284. 5.11 Formulating Algorithms: Nested Control Statements
  285. 5.11.1 Problem Statement
  286. Problem Statement Observations
  287. 5.11.2 Top-Down, Stepwise Refinement: Pseudocode Representation of the Top
  288. 5.11.3 Top-Down, Stepwise Refinement: First Refinement
  289. 5.11.4 Top-Down, Stepwise Refinement: Second Refinement
  290. 5.11.5 Complete Second Refinement of the Pseudocode
  291. 5.11.6 App That Implements the Pseudocode Algorithm
  292. 5.12 Compound Assignment Operators
  293. 5.13 Increment and Decrement Operators
  294. 5.13.1 Prefix Increment vs. Postfix Increment
  295. 5.13.2 Simplifying Increment Statements
  296. 5.13.3 Operator Precedence and Associativity
  297. 5.14 Simple Types
  298. 5.15 Wrap-Up
  299. Summary
  300. Section 5.2 Algorithms
  301. Section 5.3 Pseudocode
  302. Section 5.4 Control Structures
  303. Section 5.4.1 Sequence Structure
  304. Section 5.4.2 Selection Statements
  305. Section 5.4.3 Iteration Statements
  306. Section 5.4.4 Summary of Control Statements
  307. Section 5.5 if Single-Selection Statement
  308. Section 5.6 if…else Double-Selection Statement
  309. Section 5.6.3 Blocks
  310. Section 5.6.4 Conditional Operator (?:)
  311. Section 5.7 Student Class: Nested if…else Statements
  312. Section 5.8 while Iteration Statement
  313. Section 5.9.1 Pseudocode Algorithm with Counter-Controlled Iteration
  314. Section 5.9.2 Implementing Counter-Controlled Iteration
  315. Section 5.9.3 Integer Division and Truncation
  316. Section 5.10 Formulating Algorithms: Sentinel-Controlled Iteration
  317. Section 5.10.1 Top-Down, Stepwise Refinement: The Top and First Refinement
  318. Section 5.10.2 Second Refinement
  319. Section 5.10.3 Implementing Sentinel-Controlled Iteration
  320. Section 5.10.6 Converting Between Simple Types Explicitly and Implicitly
  321. Section 5.10.7 Formatting Floating-Point Numbers
  322. Section 5.12 Compound Assignment Operators
  323. Section 5.13 Increment and Decrement Operators
  324. Section 5.14 Simple Types
  325. Terminology
  326. Self-Review Exercises
  327. Answers to Self-Review Exercises
  328. Exercises
  329. Making-a-Difference Exercises
  330. 6 Control Statements: Part 2
  331. Objectives
  332. Outline
  333. 6.1 Introduction
  334. 6.2 Essentials of Counter-Controlled Iteration
  335. 6.3 for Iteration Statement
  336. 6.3.1 A Closer Look at the for Statement’s Header
  337. 6.3.2 General Format of a for Statement
  338. 6.3.3 Scope of a for Statement’s Control Variable
  339. 6.3.4 Expressions in a for Statement’s Header Are Optional
  340. 6.3.5 Placing Arithmetic Expressions in a for Statement’s Header
  341. 6.3.6 Using a for Statement’s Control Variable in the Statement’s Body
  342. 6.3.7 UML Activity Diagram for the for Statement
  343. 6.4 Examples Using the for Statement
  344. 6.5 App: Summing Even Integers
  345. 6.6 App: Compound-Interest Calculations
  346. 6.6.1 Performing the Interest Calculations with Math Method pow
  347. 6.6.2 Formatting with Field Widths and Alignment
  348. 6.6.3 Caution: Do Not Use float or double for Monetary Amounts
  349. Applications of Floating-Point Numbers
  350. A Warning About Displaying Rounded Values
  351. 6.7 do…while Iteration Statement
  352. 6.8 switch Multiple-Selection Statement
  353. 6.8.1 Using a switch Statement to Count A, B, C, D and F Grades
  354. Reading Grades from the User
  355. Processing the Grades
  356. The switch Statement
  357. Consecutive case Labels
  358. The default Case
  359. No “Fall Through” in the C# switch Statement
  360. Displaying the Grade Report
  361. 6.8.2 switch Statement UML Activity Diagram
  362. 6.8.3 Notes on the Expression in Each case of a switch
  363. 6.9 Class AutoPolicy Case Study: strings in switch Statements
  364. 6.10 break and continue Statements
  365. 6.10.1 break Statement
  366. 6.10.2 continue Statement
  367. 6.11 Logical Operators
  368. 6.11.1 Conditional AND (&&) Operator
  369. 6.11.2 Conditional OR (||) Operator
  370. 6.11.3 Short-Circuit Evaluation of Complex Conditions
  371. 6.11.4 Boolean Logical AND (&) and Boolean Logical OR (|) Operators
  372. 6.11.5 Boolean Logical Exclusive OR (^)
  373. 6.11.6 Logical Negation (!) Operator
  374. 6.11.7 Logical Operators Example
  375. Precedence and Associativity of the Operators Presented So Far
  376. 6.12 Structured-Programming Summary
  377. 6.13 Wrap-Up
  378. Summary
  379. Section 6.2 Essentials of Counter-Controlled Iteration
  380. Section 6.3 for Iteration Statement
  381. Section 6.3.1 A Closer Look at the for Statement’s Header
  382. Section 6.3.2 General Format of a for Statement
  383. Section 6.3.3 Scope of a for Statement’s Control Variable
  384. Section 6.3.5 Placing Arithmetic Expressions in a for Statement’s Header
  385. Section 6.6 App: Compound-Interest Calculations
  386. Section 6.6.1 Performing the Interest Calculations with Math Method pow
  387. Section 6.6.2 Formatting with Field Widths and Alignment
  388. Section 6.6.3 Caution: Do Not Use float or double for Monetary Amounts
  389. Section 6.7 do…while Iteration Statement
  390. Section 6.8 switch Multiple-Selection Statement
  391. Section 6.8.1 Using a switch Statement to Count A, B, C, D and F Grades.
  392. Section 6.10.1 break Statement
  393. Section 6.10.2 continue Statement
  394. Section 6.11 Logical Operators
  395. Section 6.11.1 Conditional AND (&&) Operator
  396. Section 6.11.2 Conditional OR (||) Operator
  397. Section 6.11.3 Short-Circuit Evaluation of Complex Conditions
  398. Section 6.11.4 Boolean Logical AND (&) and Boolean Logical OR (|) Operators
  399. Section 6.11.5 Boolean Logical Exclusive OR (^)
  400. Section 6.11.6 Logical Negation (!) Operator
  401. Section 6.12 Structured-Programming Summary
  402. Terminology
  403. Self-Review Exercises
  404. Answers to Self-Review Exercises
  405. Exercises
  406. Making-a-Difference Exercises
  407. 7 Methods: A Deeper Look
  408. Objectives
  409. Outline
  410. 7.1 Introduction
  411. 7.2 Packaging Code in C#
  412. 7.2.1 Modularizing Programs
  413. 7.2.2 Calling Methods
  414. 7.3 static Methods, static Variables and Class Math
  415. 7.3.1 Math Class Methods
  416. 7.3.2 Math Class Constants PI and E
  417. 7.3.3 Why Is Main Declared static?
  418. 7.3.4 Additional Comments About Main
  419. 7.4 Methods with Multiple Parameters
  420. 7.4.1 Keyword static
  421. 7.4.2 Method Maximum
  422. Logic of Determining the Maximum Value
  423. 7.4.3 Assembling strings with Concatenation
  424. Anything Can Be Converted to a string
  425. Formatting strings with string Interpolation
  426. 7.4.4 Breaking Apart Large string Literals
  427. 7.4.5 When to Declare Variables as Fields
  428. 7.4.6 Implementing Method Maximum by Reusing Method Math.Max
  429. 7.5 Notes on Using Methods
  430. Three Ways to Call a Method
  431. Three Ways to Return from a Method
  432. static Members Can Access Only the Class’s Other static Members Directly
  433. 7.6 Argument Promotion and Casting
  434. 7.6.1 Promotion Rules
  435. 7.6.2 Sometimes Explicit Casts Are Required
  436. 7.7 The .NET Framework Class Library
  437. 7.8 Case Study: Random-Number Generation
  438. 7.8.1 Creating an Object of Type Random
  439. 7.8.2 Generating a Random Integer
  440. 7.8.3 Scaling the Random-Number Range
  441. 7.8.4 Shifting Random-Number Range
  442. 7.8.5 Combining Shifting and Scaling
  443. 7.8.6 Rolling a Six-Sided Die
  444. Rolling a Six-Sided Die 60,000,000 Times
  445. 7.8.7 Scaling and Shifting Random Numbers
  446. 7.8.8 Repeatability for Testing and Debugging
  447. 7.9 Case Study: A Game of Chance; Introducing Enumerations
  448. 7.9.1 Method RollDice
  449. 7.9.2 Method Main’s Local Variables
  450. 7.9.3 enum Type Status
  451. 7.9.4 The First Roll
  452. 7.9.5 enum Type DiceNames
  453. 7.9.6 Underlying Type of an enum
  454. 7.9.7 Comparing Integers and enum Constants
  455. Additional Rolls of the Dice
  456. Control Statements in the Craps Example
  457. Code Snippets for Auto-Implemented Properties
  458. 7.10 Scope of Declarations
  459. 7.11 Method-Call Stack and Activation Records
  460. 7.11.1 Method-Call Stack
  461. 7.11.2 Stack Frames
  462. 7.11.3 Local Variables and Stack Frames
  463. 7.11.4 Stack Overflow
  464. 7.11.5 Method-Call Stack in Action
  465. 7.12 Method Overloading
  466. 7.12.1 Declaring Overloaded Methods
  467. 7.12.2 Distinguishing Between Overloaded Methods
  468. 7.12.3 Return Types of Overloaded Methods
  469. 7.13 Optional Parameters
  470. 7.14 Named Parameters
  471. 7.15 C# 6 Expression-Bodied Methods and Properties
  472. 7.16 Recursion
  473. 7.16.1 Base Cases and Recursive Calls
  474. 7.16.2 Recursive Factorial Calculations
  475. 7.16.3 Implementing Factorial Recursively
  476. 7.17 Value Types vs. Reference Types
  477. 7.18 Passing Arguments By Value and By Reference
  478. 7.18.1 ref and out Parameters
  479. ref Parameters
  480. out Parameters
  481. Passing Reference-Type Variables by Reference
  482. 7.18.2 Demonstrating ref, out and Value Parameters
  483. 7.19 Wrap-Up
  484. Summary
  485. Section 7.1 Introduction
  486. Section 7.2 Packaging Code in C#
  487. Section 7.2.1 Modularizing Programs
  488. Section 7.3 static Methods, static Variables and Class Math
  489. Section 7.3.1 Math Class Methods
  490. Section 7.3.2 Math Class Constants PI and E
  491. Section 7.3.4 Additional Comments About Main
  492. Section 7.4.2 Method Maximum
  493. Section 7.4.3 Assembling strings with Concatenation
  494. Section 7.4.4 Breaking Apart Large string Literals
  495. Section 7.5 Notes on Declaring and Using Methods
  496. Section 7.6 Argument Promotion and Casting
  497. Section 7.6.1 Promotion Rules
  498. Section 7.6.2 Sometimes Explicit Casts Are Required
  499. Section 7.7 The .NET Framework Class Library
  500. Section 7.8.2 Generating a Random Integer
  501. Section 7.8.3 Scaling the Random-Number Range
  502. Section 7.8.8 Repeatability for Testing and Debugging
  503. Section 7.9.3 enum Type Status
  504. Section 7.9.5 enum Type DiceNames
  505. Section 7.9.6 Underlying Type of an enum
  506. Section 7.10 Scope of Declarations
  507. Section 7.11 Method-Call Stack and Activation Records
  508. Section 7.11.1 Method-Call Stack
  509. Section 7.11.2 Stack Frames
  510. Section 7.11.3 Local Variables and Stack Frames
  511. Section 7.11.4 Stack Overflow
  512. Section 7.12.1 Declaring Overloaded Methods
  513. Section 7.12.2 Distinguishing Between Overloaded Methods
  514. Section 7.12.3 Return Types of Overloaded Methods
  515. Section 7.13 Optional Parameters
  516. Section 7.14 Named Parameters
  517. Section 7.15 C# 6 Expression-Bodied Methods and Properties
  518. Section 7.16 Recursion
  519. Section 7.16.1 Base Cases and Recursive Calls
  520. Section 7.16.2 Recursive Factorial Calculations
  521. Section 7.17 Value Types vs. Reference Types
  522. Section 7.18 Passing Arguments by Value and by Reference
  523. Section 7.18.1 ref and out Parameters
  524. Terminology
  525. Self-Review Exercises
  526. Answers to Self-Review Exercises
  527. Exercises
  528. Making-a-Difference Exercises
  529. 8 Arrays; Introduction to Exception Handling
  530. Objectives
  531. Outline
  532. 8.1 Introduction
  533. 8.2 Arrays
  534. 8.3 Declaring and Creating Arrays
  535. 8.4 Examples Using Arrays
  536. 8.4.1 Creating and Initializing an Array
  537. 8.4.2 Using an Array Initializer
  538. 8.4.3 Calculating a Value to Store in Each Array Element
  539. Declaring a Named Constant with const
  540. 8.4.4 Summing the Elements of an Array
  541. 8.4.5 Iterating Through Arrays with foreach
  542. foreach vs. for
  543. 8.4.6 Using Bar Charts to Display Array Data Graphically; Introducing Type Inference with var
  544. Implicitly Typed Local Variables and Keyword var
  545. More on Implicitly Typed Local Variables
  546. 8.4.7 Using the Elements of an Array as Counters
  547. 8.5 Using Arrays to Analyze Survey Results; Intro to Exception Handling
  548. 8.5.1 Summarizing the Results
  549. 8.5.2 Exception Handling: Processing the Incorrect Response
  550. 8.5.3 The try Statement
  551. 8.5.4 Executing the catch Block
  552. 8.5.5 Message Property of the Exception Parameter
  553. 8.6 Case Study: Card Shuffling and Dealing Simulation
  554. 8.6.1 Class Card and Getter-Only Auto-Implemented Properties
  555. 8.6.2 Class DeckOfCards
  556. Class DeckOfCards: Constructor
  557. Class DeckOfCards: Shuffle Method
  558. Recommendation: Use an Unbiased Shuffling Algorithm
  559. Class DeckOfCards: DealCard Method
  560. 8.6.3 Shuffling and Dealing Cards
  561. 8.7 Passing Arrays and Array Elements to Methods
  562. 8.8 Case Study: GradeBook Using an Array to Store Grades
  563. 8.9 Multidimensional Arrays
  564. 8.9.1 Rectangular Arrays
  565. Array-Access Expression for a Two-Dimensional Rectangular Array
  566. Array Initializer for a Two-Dimensional Rectangular Array
  567. 8.9.2 Jagged Arrays
  568. Array Initializer for a Two-Dimensional Jagged Array
  569. Diagram of a Two-Dimensional Jagged Array in Memory
  570. Creating Two-Dimensional Arrays with Array-Creation Expressions
  571. 8.9.3 Two-Dimensional Array Example: Displaying Element Values
  572. Overloaded Method OutputArray
  573. Method OutputArray for Rectangular Arrays
  574. Method OutputArray for Jagged Arrays
  575. Common Multidimensional-Array Manipulations Performed with for Statements
  576. 8.10 Case Study: GradeBook Using a Rectangular Array
  577. 8.11 Variable-Length Argument Lists
  578. 8.12 Using Command-Line Arguments
  579. 8.13 (Optional) Passing Arrays by Value and by Reference
  580. 8.14 Wrap-Up
  581. Summary
  582. Section 8.1 Introduction
  583. Section 8.2 Arrays
  584. Section 8.3 Declaring and Creating Arrays
  585. Section 8.4.2 Using an Array Initializer
  586. Section 8.4.3 Calculating a Value to Store in Each Array Element
  587. Section 8.4.5 Iterating Through Arrays with foreach
  588. Section 8.4.6 Using Bar Charts to Display Array Data Graphically; Introducing Type Inference with var
  589. Section 8.5.2 Exception Handling: Processing the Incorrect Response
  590. Section 8.5.3 The try Statement
  591. Section 8.5.4 Executing the catch Block
  592. Section 8.5.5 Message Property of the Exception Parameter
  593. Section 8.6.1 Class Card and Getter-Only Auto-Implemented Properties
  594. Section 8.7 Passing Arrays and Array Elements to Methods
  595. Section 8.9 Multidimensional Arrays
  596. Section 8.10 Case Study: GradeBook Using a Rectangular Array
  597. Section 8.11 Variable-Length Argument Lists
  598. Section 8.12 Using Command-Line Arguments
  599. Section 8.13 (Optional) Passing Arrays by Value and by Reference
  600. Terminology
  601. Self-Review Exercises
  602. Answers to Self-Review Exercises
  603. Exercises
  604. Special Section: Building Your Own Computer
  605. Making-a-Difference Exercise
  606. 9 Introduction to LINQ and the List Collection
  607. Objectives
  608. Outline
  609. 9.1 Introduction
  610. 9.2 Querying an Array of int Values Using LINQ
  611. 9.2.1 The from Clause
  612. Implicitly Typed Local Variables
  613. 9.2.2 The where Clause
  614. 9.2.3 The select Clause
  615. 9.2.4 Iterating Through the Results of the LINQ Query
  616. LINQ vs. Iteration Statements
  617. 9.2.5 The orderby Clause
  618. 9.2.6 Interface IEnumerable<T>
  619. 9.3 Querying an Array of Employee Objects Using LINQ
  620. 9.3.1 Accessing the Properties of a LINQ Query’s Range Variable
  621. 9.3.2 Sorting a LINQ Query’s Results by Multiple Properties
  622. 9.3.3 Any, First and Count Extension Methods
  623. 9.3.4 Selecting a Property of an Object
  624. 9.3.5 Creating New Types in the select Clause of a LINQ Query
  625. Projections
  626. Changing the Names of Properties in Anonymous Types
  627. 9.4 Introduction to Collections
  628. 9.4.1 List<T> Collection
  629. 9.4.2 Dynamically Resizing a List<T> Collection
  630. Adding and Inserting Elements
  631. Count and Capacity
  632. Iterating Through a List’s Contents
  633. Adding More Elements and Growing the List
  634. Removing Elements
  635. Determining Whether an Element Is in the List
  636. Adding More Elements and Growing the List
  637. Doubling the Capacity
  638. 9.5 Querying the Generic List Collection Using LINQ
  639. 9.5.1 The let Clause
  640. 9.5.2 Deferred Execution
  641. 9.5.3 Extension Methods ToArray and ToList
  642. 9.5.4 Collection Initializers
  643. 9.6 Wrap-Up
  644. 9.7 Deitel LINQ Resource Center
  645. Summary
  646. Section 9.1 Introduction
  647. Section 9.2 Querying an Array of int Values Using LINQ
  648. Section 9.2.1 The from Clause
  649. Section 9.2.2 The where Clause
  650. Section 9.2.3 The select Clause
  651. Section 9.2.4 Iterating Through the Results of the LINQ Query
  652. Section 9.2.5 The orderby Clause
  653. Section 9.2.6 Interface IEnumerable<T>
  654. Section 9.3 Querying an Array of Employee Objects Using LINQ
  655. Section 9.3.2 Sorting a LINQ Query’s Results by Multiple Properties
  656. Section 9.3.3 Any, First and Count Extension Methods
  657. Section 9.3.4 Selecting a Property of an Object
  658. Section 9.3.5 Creating New Types in the select Clause of a LINQ Query
  659. Section 9.4 Introduction to Collections
  660. Section 9.4.1 List<T> Collection
  661. Section 9.5 Querying the Generic List Collection Using LINQ
  662. Section 9.5.1 The let Clause
  663. Section 9.5.2 Deferred Execution
  664. Section 9.5.3 Extension Methods ToArray and ToList
  665. Section 9.5.4 Collection Initializers
  666. Terminology
  667. Self-Review Exercises
  668. Answers to Self-Review Exercises
  669. Exercises
  670. 10 Classes and Objects: A Deeper Look
  671. Objectives
  672. Outline
  673. 10.1 Introduction
  674. 10.2 Time Class Case Study; Throwing Exceptions
  675. 10.2.1 Time1 Class Declaration
  676. public Class
  677. Method SetTime and Throwing Exceptions
  678. Method ToUniversalString
  679. Method ToString
  680. 10.2.2 Using Class Time1
  681. Calling Time Method SetTime with Invalid Values
  682. Notes on the Time1 Class Declaration
  683. 10.3 Controlling Access to Members
  684. 10.4 Referring to the Current Object’s Members with the this Reference
  685. 10.5 Time Class Case Study: Overloaded Constructors
  686. 10.5.1 Class Time2 with Overloaded Constructors
  687. Class Time2’s Three-Argument Constructor
  688. Constructor Initializers
  689. SetTime Method and the Hour, Minute and Second Properties
  690. Notes Regarding Class Time2’s Methods, Properties and Constructors
  691. 10.5.2 Using Class Time2’s Overloaded Constructors
  692. 10.6 Default and Parameterless Constructors
  693. 10.7 Composition
  694. 10.7.1 Class Date
  695. Constructor
  696. private set Accessors
  697. 10.7.2 Class Employee
  698. 10.7.3 Class EmployeeTest
  699. 10.8 Garbage Collection and Destructors
  700. 10.9 static Class Members
  701. 10.10 readonly Instance Variables
  702. 10.11 Class View and Object Browser
  703. 10.11.1 Using the Class View Window
  704. 10.11.2 Using the Object Browser
  705. 10.12 Object Initializers
  706. 10.13 Operator Overloading; Introducing struct
  707. 10.13.1 Creating Value Types with struct
  708. When to Declare a struct Type
  709. 10.13.2 Value Type ComplexNumber
  710. Constructor
  711. Overloaded Operators
  712. 10.13.3 Class ComplexTest
  713. 10.14 Time Class Case Study: Extension Methods
  714. 10.15 Wrap-Up
  715. Summary
  716. Section 10.2.1 Time1 Class Declaration
  717. Section 10.2.2 Using Class Time1
  718. Section 10.3 Controlling Access to Members
  719. Section 10.4 Referring to the Current Object’s Members with the this Reference
  720. Section 10.5 Time Class Case Study: Overloaded Constructors
  721. Section 10.5.1 Class Time2 with Overloaded Constructors
  722. Section 10.6 Default and Parameterless Constructors
  723. Section 10.7 Composition
  724. Section 10.8 Garbage Collection and Destructors
  725. Section 10.9 static Class Members
  726. Section 10.10 readonly Instance Variables
  727. Section 10.11.1 Using the Class View Window
  728. Section 10.11.2 Using the Object Browser
  729. Section 10.12 Object Initializers
  730. Section 10.13 Operator Overloading; Introducing struct
  731. Section 10.13.1 Creating Value Types with struct
  732. Section 10.13.2 Value Type ComplexNumber
  733. Section 10.14 Time Class Case Study: Extension Methods
  734. Terminology
  735. Self-Review Exercises
  736. Answers to Self-Review Exercises
  737. Exercises
  738. 11 Object-Oriented Programming: Inheritance
  739. Objectives
  740. Outline
  741. 11.1 Introduction
  742. 11.2 Base Classes and Derived Classes
  743. 11.3 protected Members
  744. 11.4 Relationship between Base Classes and Derived Classes
  745. 11.4.1 Creating and Using a CommissionEmployee Class
  746. CommissionEmployee Class Overview
  747. CommissionEmployee Constructor
  748. CommissionEmployee Method Earnings
  749. CommissionEmployee Method ToString
  750. Class CommissionEmployeeTest
  751. 11.4.2 Creating a BasePlusCommissionEmployee Class without Using Inheritance
  752. Class BasePlusCommissionEmployeeTest
  753. Code Duplication
  754. 11.4.3 Creating a CommissionEmployee–BasePlusCommissionEmployee Inheritance Hierarchy
  755. A Derived Class’s Constructor Must Call Its Base Class’s Constructor
  756. BasePlusCommissionEmployee Method Earnings
  757. 11.4.4 CommissionEmployee–BasePlusCommissionEmployee Inheritance Hierarchy Using protected Instance Variables
  758. Class BasePlusCommissionEmployee
  759. Testing Class BasePlusCommissionEmployee
  760. public vs. protected Data
  761. Problems with protected Instance Variables
  762. 11.4.5 CommissionEmployee–BasePlusCommissionEmployee Inheritance Hierarchy Using private Instance Variables
  763. Base Class CommissionEmployee
  764. Derived Class BasePlusCommissionEmployee
  765. BasePlusCommissionEmployee Method Earnings
  766. BasePlusCommissionEmployee Method ToString
  767. Testing Class BasePlusCommissionEmployee
  768. 11.5 Constructors in Derived Classes
  769. 11.6 Software Engineering with Inheritance
  770. 11.7 Class object
  771. 11.8 Wrap-Up
  772. Summary
  773. Section 11.1 Introduction
  774. Section 11.2 Base Classes and Derived Classes
  775. Section 11.3 protected Members
  776. Section 11.4.1 Creating and Using a CommissionEmployee Class
  777. Section 11.4.2 Creating a BasePlusCommissionEmployee Class without Using Inheritance
  778. Section 11.4.3 Creating a CommissionEmployee–BasePlusCommissionEmployee Inheritance Hierarchy
  779. Section 11.4.4CommissionEmployee–BasePlusCommissionEmployee Inheritance Hierarchy Using protected Instance Variables
  780. Section 11.4.5CommissionEmployee–BasePlusCommissionEmployee Inheritance Hierarchy Using private Instance Variables
  781. Section 11.5 Constructors in Derived Classes
  782. Section 11.6 Software Engineering with Inheritance
  783. Section 11.7 Class object
  784. Terminology
  785. Self-Review Exercises
  786. Answers to Self-Review Exercises
  787. Exercises
  788. 12 OOP: Polymorphism and Interfaces
  789. Objectives
  790. Outline
  791. 12.1 Introduction
  792. 12.2 Polymorphism Examples
  793. 12.3 Demonstrating Polymorphic Behavior
  794. 12.4 Abstract Classes and Methods
  795. 12.5 Case Study: Payroll System Using Polymorphism
  796. 12.5.1 Creating Abstract Base Class Employee
  797. Class Employee
  798. 12.5.2 Creating Concrete Derived Class SalariedEmployee
  799. 12.5.3 Creating Concrete Derived Class HourlyEmployee
  800. 12.5.4 Creating Concrete Derived Class CommissionEmployee
  801. 12.5.5 Creating Indirect Concrete Derived Class BasePlusCommissionEmployee
  802. 12.5.6 Polymorphic Processing, Operator is and Downcasting
  803. Assigning Derived-Class Objects to Base-Class References
  804. Polymorphic Processing of Employees
  805. Giving BasePlusCommissionEmployees 10% Raises
  806. Every Object Knows Its Own Type
  807. Avoiding Compilation Errors with Downcasting
  808. 12.5.7 Summary of the Allowed Assignments Between Base-Class and Derived-Class Variables
  809. 12.6 sealed Methods and Classes
  810. 12.7 Case Study: Creating and Using Interfaces
  811. 12.7.1 Developing an IPayable Hierarchy
  812. UML Diagram Containing an Interface
  813. 12.7.2 Declaring Interface IPayable
  814. 12.7.3 Creating Class Invoice
  815. 12.7.4 Modifying Class Employee to Implement Interface IPayable
  816. Derived Classes of Employee and Interface IPayable
  817. 12.7.5 Using Interface IPayable to Process Invoices and Employees Polymorphically
  818. 12.7.6 Common Interfaces of the .NET Framework Class Library
  819. 12.8 Wrap-Up
  820. Summary
  821. Section 12.1 Introduction
  822. Section 12.2 Polymorphism Examples
  823. Section 12.3 Demonstrating Polymorphic Behavior
  824. Section 12.4 Abstract Classes and Methods
  825. Section 12.5 Case Study: Payroll System Using Polymorphism
  826. Section 12.6 sealed Methods and Classes
  827. Section 12.7 Case Study: Creating and Using Interfaces
  828. Terminology
  829. Self-Review Exercises
  830. Answers to Self-Review Exercises
  831. Exercises
  832. Making-a-Difference Exercise
  833. 13 Exception Handling: A Deeper Look
  834. Objectives
  835. Outline
  836. 13.1 Introduction
  837. 13.2 Example: Divide by Zero without Exception Handling
  838. 13.2.1 Dividing By Zero
  839. 13.2.2 Enter a Non-Numeric Denominator
  840. 13.2.3 Unhandled Exceptions Terminate the App
  841. 13.3 Example: Handling DivideByZeroExceptions and FormatExceptions
  842. Sample Outputs
  843. Another Way to Convert Strings to Integers
  844. 13.3.1 Enclosing Code in a try Block
  845. 13.3.2 Catching Exceptions
  846. 13.3.3 Uncaught Exceptions
  847. 13.3.4 Termination Model of Exception Handling
  848. 13.3.5 Flow of Control When Exceptions Occur
  849. 13.4 .NET Exception Hierarchy
  850. 13.4.1 Class SystemException
  851. 13.4.2 Which Exceptions Might a Method Throw?
  852. 13.5 finally Block
  853. 13.5.1 Moving Resource-Release Code to a finally Block
  854. 13.5.2 Demonstrating the finally Block
  855. 13.5.3 Throwing Exceptions Using the throw Statement
  856. 13.5.4 Rethrowing Exceptions
  857. 13.5.5 Returning After a finally Block
  858. 13.6 The using Statement
  859. 13.7 Exception Properties
  860. 13.7.1 Property InnerException
  861. 13.7.2 Other Exception Properties
  862. 13.7.3 Demonstrating Exception Properties and Stack Unwinding
  863. 13.7.4 Throwing an Exception with an InnerException
  864. 13.7.5 Displaying Information About the Exception
  865. 13.8 User-Defined Exception Classes
  866. Class NegativeNumberException
  867. Using Class NegativeNumberException
  868. 13.9 Checking for null References; Introducing C# 6’s ?. Operator
  869. 13.9.1 Null-Conditional Operator (?.)
  870. 13.9.2 Revisiting Operators is and as
  871. 13.9.3 Nullable Types
  872. 13.9.4 Null Coalescing Operator (??)
  873. 13.10 Exception Filters and the C# 6 when Clause
  874. 13.11 Wrap-Up
  875. Summary
  876. Section 13.1 Introduction
  877. Section 13.2 Example: Divide by Zero without Exception Handling
  878. Section 13.2.1 Dividing By Zero
  879. Section 13.2.2 Enter a Non-Numeric Denominator
  880. Section 13.3.1 Enclosing Code in a try Block
  881. Section 13.3.2 Catching Exceptions
  882. Section 13.3.3 Uncaught Exceptions
  883. Section 13.3.4 Termination Model of Exception Handling
  884. Section 13.3.5 Flow of Control When Exceptions Occur
  885. Section 13.4 .NET Exception Hierarchy
  886. Section 13.4.1 Class SystemException
  887. Section 13.5 finally Block
  888. Section 13.5.1 Moving Resource-Release Code to a finally Block
  889. Section 13.6 The using Statement
  890. Section 13.7 Exception Properties
  891. Section 13.7.1 Property InnerException
  892. Section 13.7.3 Demonstrating Exception Properties and Stack Unwinding
  893. Section 13.8 User-Defined Exception Classes
  894. Section 13.9.1 Null-Conditional Operator (?.)
  895. Section 13.9.3 Nullable Types
  896. Section 13.9.4 Null Coalescing Operator (??)
  897. Section 13.10 Exception Filters and the C# 6 when Clause
  898. Terminology
  899. Self-Review Exercises
  900. Answers to Self-Review Exercises
  901. Exercises
  902. 14 Graphical User Interfaces with Windows Forms: Part 1
  903. Objectives
  904. Outline
  905. 14.1 Introduction
  906. 14.2 Windows Forms
  907. 14.3 Event Handling
  908. 14.3.1 A Simple Event-Driven GUI
  909. Renaming the Form1.cs File
  910. Adding a Button to the Form
  911. Adding an Event Handler for the Button’s Click Event
  912. Event Handler Parameters
  913. Displaying a MessageBox
  914. 14.3.2 Auto-Generated GUI Code
  915. 14.3.3 Delegates and the Event-Handling Mechanism
  916. Delegates
  917. Indicating the Method that a Delegate Should Call
  918. (Optional) Multicast Delegates
  919. 14.3.4 Another Way to Create Event Handlers
  920. Using the Properties Window to Create Event Handlers
  921. 14.3.5 Locating Event Information
  922. 14.4 Control Properties and Layout
  923. 14.4.1 Anchoring and Docking
  924. Anchoring Demonstration
  925. 14.4.2 Using Visual Studio To Edit a GUI’s Layout
  926. 14.5 Labels, TextBoxes and Buttons
  927. 14.6 GroupBoxes and Panels
  928. 14.7 CheckBoxes and RadioButtons
  929. 14.7.1 CheckBoxes
  930. 14.7.2 Combining Font Styles with Bitwise Operators
  931. 14.7.3 RadioButtons
  932. 14.8 PictureBoxes
  933. Using Resources Programmatically
  934. 14.9 ToolTips
  935. 14.10 NumericUpDown Control
  936. 14.11 Mouse-Event Handling
  937. 14.12 Keyboard-Event Handling
  938. 14.13 Wrap-Up
  939. Summary
  940. Section 14.1 Introduction
  941. Section 14.2 Windows Forms
  942. Section 14.3 Event Handling
  943. Section 14.3.1 A Simple Event-Driven GUI
  944. Section 14.3.2 Auto-Generated GUI Code
  945. Section 14.3.3 Delegates and the Event-Handling Mechanism
  946. Section 14.3.4 Another Way to Create Event Handlers
  947. Section 14.3.5 Locating Event Information
  948. Section 14.4 Control Properties and Layout
  949. Section 14.5 Labels, TextBoxes and Buttons
  950. Section 14.6 GroupBoxes and Panels
  951. Section 14.7 CheckBoxes and RadioButtons
  952. Section 14.8 PictureBoxes
  953. Section 14.9 ToolTips
  954. Section 14.10 NumericUpDown Control
  955. Section 14.11 Mouse-Event Handling
  956. Section 14.12 Keyboard-Event Handling
  957. Terminology
  958. Self-Review Exercises
  959. Answers To Self-Review Exercises
  960. Exercises
  961. Making-a-Difference Exercises
  962. 15 Graphical User Interfaces with Windows Forms: Part 2
  963. Objectives
  964. Outline
  965. 15.1 Introduction
  966. 15.2 Menus
  967. 15.3 MonthCalendar Control
  968. 15.4 DateTimePicker Control
  969. 15.5 LinkLabel Control
  970. 15.6 ListBox Control
  971. 15.7 CheckedListBox Control
  972. 15.8 ComboBox Control
  973. 15.9 TreeView Control
  974. 15.10 ListView Control
  975. 15.11 TabControl Control
  976. 15.12 Multiple Document Interface (MDI) Windows
  977. 15.13 Visual Inheritance
  978. 15.14 User-Defined Controls
  979. 15.15 Wrap-Up
  980. Summary
  981. Section 15.2 Menus
  982. Section 15.3 MonthCalendar Control
  983. Section 15.4 DateTimePicker Control
  984. Section 15.5 LinkLabel Control
  985. Section 15.6 ListBox Control
  986. Section 15.7 CheckedListBox Control
  987. Section 15.8 ComboBox Control
  988. Section 15.9 TreeView Control
  989. Section 15.10 ListView Control
  990. Section 15.11 TabControl Control
  991. Section 15.12 Multiple Document Interface (MDI) Windows
  992. Section 15.13 Visual Inheritance
  993. Section 15.14 User-Defined Controls
  994. Terminology
  995. Self-Review Exercises
  996. Answers to Self-Review Exercises
  997. Exercises
  998. 16 Strings and Characters: A Deeper Look
  999. Objectives
  1000. Outline
  1001. 16.1 Introduction
  1002. 16.2 Fundamentals of Characters and Strings
  1003. 16.3 string Constructors
  1004. 16.4 string Indexer, Length Property and CopyTo Method
  1005. 16.5 Comparing strings
  1006. 16.6 Locating Characters and Substrings in strings
  1007. 16.7 Extracting Substrings from strings
  1008. 16.8 Concatenating strings
  1009. 16.9 Miscellaneous string Methods
  1010. 16.10 Class StringBuilder
  1011. 16.11 Length and Capacity Properties, EnsureCapacity Method and Indexer of Class StringBuilder
  1012. 16.12 Append and AppendFormat Methods of Class StringBuilder
  1013. 16.13 Insert, Remove and Replace Methods of Class StringBuilder
  1014. 16.14 Char Methods
  1015. 16.15 Introduction to Regular Expressions (Online)
  1016. 16.16 Wrap-Up
  1017. Summary
  1018. Section 16.2 Fundamentals of Characters and Strings
  1019. Section 16.3 string Constructors
  1020. Section 16.4 string Indexer, Length Property and CopyTo Method
  1021. Section 16.5 Comparing strings
  1022. Section 16.6 Locating Characters and Substrings in strings
  1023. Section 16.7 Extracting Substrings from strings
  1024. Section 16.8 Concatenating strings
  1025. Section 16.10 Class StringBuilder
  1026. Section 16.11 Length and Capacity Properties, EnsureCapacity Method and Indexer of Class StringBuilder
  1027. Section 16.12 Append and AppendFormat Methods of Class StringBuilder
  1028. Section 16.13 Insert, Remove and Replace Methods of Class StringBuilder
  1029. Section 16.14 Char Methods
  1030. Terminology
  1031. Self-Review Exercises
  1032. Answers to Self-Review Exercises
  1033. Exercises
  1034. Making-a-Difference Exercises
  1035. 17 Files and Streams
  1036. Objectives
  1037. Outline
  1038. 17.1 Introduction
  1039. 17.2 Files and Streams
  1040. 17.3 Creating a Sequential-Access Text File
  1041. 17.4 Reading Data from a Sequential-Access Text File
  1042. 17.5 Case Study: Credit-Inquiry Program
  1043. 17.6 Serialization
  1044. 17.7 Creating a Sequential-Access File Using Object Serialization
  1045. 17.8 Reading and Deserializing Data from a Binary File
  1046. 17.9 Classes File and Directory
  1047. 17.9.1 Demonstrating Classes File and Directory
  1048. 17.9.2 Searching Directories with LINQ
  1049. Method SearchDirectory
  1050. Method CleanDirectory
  1051. 17.10 Wrap-Up
  1052. Summary
  1053. Section 17.1 Introduction
  1054. Section 17.2 Files and Streams
  1055. Section 17.3 Creating a Sequential-Access Text File
  1056. Section 17.4 Reading Data from a Sequential-Access Text File
  1057. Section 17.5 Case Study: Credit-Inquiry Program
  1058. Section 17.6 Serialization
  1059. Section 17.7 Creating a Sequential-Access File Using Object Serialization
  1060. Section 17.8 Reading and Deserializing Data from a Binary File
  1061. Section 17.9 Classes File and Directory
  1062. Terminology
  1063. Self-Review Exercises
  1064. Answers to Self-Review Exercises
  1065. Exercises
  1066. Making-a-Difference Exercises
  1067. 18 Searching and Sorting
  1068. Objectives
  1069. Outline
  1070. 18.1 Introduction
  1071. 18.2 Searching Algorithms
  1072. 18.2.1 Linear Search
  1073. Performing a Linear Search
  1074. Method LinearSearch
  1075. Efficiency of Linear Search
  1076. Constant Runtime
  1077. Linear Runtime
  1078. Quadratic Runtime
  1079. Linear Search Runtime
  1080. 18.2.2 Binary Search
  1081. Implementing Binary Search
  1082. Method BinarySearch
  1083. Efficiency of Binary Search
  1084. 18.3 Sorting Algorithms
  1085. 18.3.1 Selection Sort
  1086. Implementing Selection Sort
  1087. Method SelectionSort
  1088. Efficiency of Selection Sort
  1089. 18.3.2 Insertion Sort
  1090. Implementing Insertion Sort
  1091. Efficiency of Insertion Sort
  1092. 18.3.3 Merge Sort
  1093. Implementing Merge Sort
  1094. Method SortArray
  1095. Method Merge
  1096. Efficiency of Merge Sort
  1097. 18.4 Summary of the Efficiency of Searching and Sorting Algorithms
  1098. 18.5 Wrap-Up
  1099. Summary
  1100. Section 18.1 Introduction
  1101. Section 18.2.1 Linear Search
  1102. Section 18.2.2 Binary Search
  1103. Section 18.3.1 Selection Sort
  1104. Section 18.3.2 Insertion Sort
  1105. Section 18.3.3 Merge Sort
  1106. Terminology
  1107. Self-Review Exercises
  1108. Answers to Self-Review Exercises
  1109. Exercises
  1110. 19 Custom Linked Data Structures
  1111. Objectives
  1112. Outline
  1113. 19.1 Introduction
  1114. 19.2 Simple-Type structs, Boxing and Unboxing
  1115. 19.3 Self-Referential Classes
  1116. 19.4 Linked Lists
  1117. 19.5 Stacks
  1118. 19.6 Queues
  1119. 19.7 Trees
  1120. 19.7.1 Binary Search Tree of Integer Values
  1121. Inorder Traversal Algorithm
  1122. Preorder Traversal Algorithm
  1123. Postorder Traversal Algorithm
  1124. Duplicate Elimination
  1125. Overview of the Level-Order Binary-Tree Exercise
  1126. 19.7.2 Binary Search Tree of IComparable Objects
  1127. 19.8 Wrap-Up
  1128. Summary
  1129. Section 19.1 Introduction
  1130. Section 19.2 Simple-Type structs, Boxing and Unboxing
  1131. Section 19.3 Self-Referential Classes
  1132. Section 19.4 Linked Lists
  1133. Section 19.5 Stacks
  1134. Section 19.6 Queues
  1135. Section 19.7 Trees
  1136. Terminology
  1137. Self-Review Exercises
  1138. Answers to Self-Review Exercises
  1139. Exercises
  1140. Special Section: Building Your Own Compiler
  1141. 20 Generics
  1142. Objectives
  1143. Outline
  1144. 20.1 Introduction
  1145. 20.2 Motivation for Generic Methods
  1146. 20.3 Generic-Method Implementation
  1147. 20.4 Type Constraints
  1148. 20.4.1 IComparable<T> Interface
  1149. 20.4.2 Specifying Type Constraints
  1150. Specifying the Type Constraint with a where Clause
  1151. Kinds of Type Constraints
  1152. Applying Multiple Type Constraints
  1153. Analyzing the Code
  1154. Value Types vs. Reference Types in Generics
  1155. 20.5 Overloading Generic Methods
  1156. 20.6 Generic Classes
  1157. 20.7 Wrap-Up
  1158. Summary
  1159. Section 20.1 Introduction
  1160. Section 20.2 Motivation for Generic Methods
  1161. Section 20.3 Generic-Method Implementation
  1162. Section 20.4 Type Constraints
  1163. Section 20.5 Overloading Generic Methods
  1164. Section 20.6 Generic Classes
  1165. Terminology
  1166. Self-Review Exercises
  1167. Answers to Self-Review Exercises
  1168. Exercises
  1169. 21 Generic Collections; Functional Programming with LINQ/PLINQ
  1170. Objectives
  1171. Outline
  1172. 21.1 Introduction
  1173. 21.2 Collections Overview
  1174. 21.3 Class Array and Enumerators
  1175. 21.3.1 C# 6 using static Directive
  1176. 21.3.2 Class UsingArray’s static Fields
  1177. 21.3.3 Array Method Sort
  1178. 21.3.4 Array Method Copy
  1179. 21.3.5 Array Method BinarySearch
  1180. 21.3.6 Array Method GetEnumerator and Interface IEnumerator
  1181. 21.3.7 Iterating Over a Collection with foreach
  1182. 21.3.8 Array Methods Clear, IndexOf, LastIndexOf and Reverse
  1183. 21.4 Dictionary Collections
  1184. 21.4.1 Dictionary Fundamentals
  1185. Hashing
  1186. Collisions
  1187. Load Factor
  1188. Hash Function
  1189. 21.4.2 Using the SortedDictionary Collection
  1190. Method CollectWords
  1191. SortedDictionary Methods ContainsKey and Add
  1192. SortedDictionary Indexer
  1193. Method DisplayDictionary
  1194. Iterating Over a SortedDictionary’s KeyValuePairs
  1195. SortedDictionary’s Values Property
  1196. 21.5 Generic LinkedList Collection
  1197. 21.6 C# 6 Null Conditional Operator ?[]
  1198. 21.7 C# 6 Dictionary Initializers and Collection Initializers
  1199. 21.8 Delegates
  1200. 21.8.1 Declaring a Delegate Type
  1201. 21.8.2 Declaring a Delegate Variable
  1202. 21.8.3 Delegate Parameters
  1203. 21.8.4 Passing a Method Name Directly to a Delegate Parameter
  1204. 21.9 Lambda Expressions
  1205. 21.9.1 Expression Lambdas
  1206. 21.9.2 Assigning Lambdas to Delegate Variables
  1207. 21.9.3 Explicitly Typed Lambda Parameters
  1208. 21.9.4 Statement Lambdas
  1209. 21.10 Introduction to Functional Programming
  1210. 21.11 Functional Programming with LINQ Method-Call Syntax and Lambdas
  1211. 21.11.1 LINQ Extension Methods Min, Max, Sum and Average
  1212. Iteration and Mutation Are Hidden from You
  1213. 21.11.2 Aggregate Extension Method for Reduction Operations
  1214. Summing the Squares of the Values with Method Aggregate
  1215. Calculating the Product of the Values with Method Aggregate
  1216. 21.11.3 The Where Extension Method for Filtering Operations
  1217. Sorting the Results
  1218. Deferred Execution
  1219. 21.11.4 Select Extension Method for Mapping Operations
  1220. 21.12 PLINQ: Improving LINQ to Objects Performance with Multicore
  1221. 21.13 (Optional) Covariance and Contravariance for Generic Types
  1222. 21.14 Wrap-Up
  1223. Summary
  1224. Section 21.1 Introduction
  1225. Section 21.2 Collections Overview
  1226. Section 21.3 Class Array and Enumerators
  1227. Section 21.3.1 C# 6 using static Directive
  1228. Section 21.3.3 Array Method Sort
  1229. Section 21.3.4 Array Method Copy
  1230. Section 21.3.5 Array Method BinarySearch
  1231. Section 21.3.6 Array Method GetEnumerator and Interface IEnumerator
  1232. Section 21.3.7 Iterating Over a Collection with foreach
  1233. Section 21.3.8 Array Methods Clear, IndexOf, LastIndexOf and Reverse
  1234. Section 21.4 Dictionary Collections
  1235. Section 21.4.1 Dictionary Fundamentals
  1236. Section 21.4.2 Using the SortedDictionary Collection
  1237. Section 21.5 Generic LinkedList Collection
  1238. Section 21.6 C# 6 Null Conditional Operator ?[]
  1239. Section 21.7 C# 6 Dictionary Initializers and Collection Initializers
  1240. Section 21.8 Delegates
  1241. Section 21.8.1 Declaring a Delegate Type
  1242. Section 21.8.2 Declaring a Delegate Variable
  1243. Section 21.8.3 Delegate Parameters
  1244. Section 21.8.4 Passing a Method Name Directly to a Delegate Parameter
  1245. Section 21.9 Lambda Expressions
  1246. Section 21.9.1 Expression Lambdas
  1247. Section 21.9.2 Assigning Lambdas to Delegate Variables
  1248. Section 21.9.3 Explicitly Typed Lambda Parameters
  1249. Section 21.9.4 Statement Lambdas
  1250. Section 21.10 Introduction to Functional Programming
  1251. Section 21.11 Functional Programming with LINQ Method-Call Syntax and Lambdas
  1252. Section 21.11.1 LINQ Extension Methods Min, Max, Sum and Average
  1253. Section 21.11.2 Aggregate Extension Method for Reduction Operations
  1254. Section 21.11.3 The Where Extension Method for Filtering Operations
  1255. Section 21.11.4 Select Extension Method for Mapping Operations
  1256. Section 21.12 PLINQ: Improving LINQ to Objects Performance with Multicore
  1257. Section 21.13 (Optional) Covariance and Contravariance for Generic Types
  1258. Terminology
  1259. Self-Review Exercises
  1260. Answers to Self-Review Exercises
  1261. Exercises
  1262. Functional-Programming Exercises
  1263. 22 Databases and LINQ
  1264. Objectives
  1265. Outline
  1266. 22.1 Introduction
  1267. 22.2 Relational Databases
  1268. 22.3 A Books Database
  1269. 22.4 LINQ to Entities and the ADO.NET Entity Framework
  1270. 22.5 Querying a Database with LINQ
  1271. 22.5.1 Creating the ADO.NET Entity Data Model Class Library
  1272. Step 1: Creating a Class Library Project for the ADO.NET Entity Data Model
  1273. Step 2: Adding the ADO.NET Entity Data Model to the Class Library
  1274. 22.5.2 Creating a Windows Forms Project and Configuring It to Use the Entity Data Model
  1275. Step 1: Creating the Project
  1276. Step 2: Adding a Reference to the BooksExamples Class Library
  1277. Step 3: Adding a Reference to EntityFramework
  1278. Step 4: Adding the Connection String to the Windows Forms App
  1279. 22.5.3 Data Bindings Between Controls and the Entity Data Model
  1280. Step 1: Adding a Data Source for the Authors Table
  1281. Step 2: Creating GUI Elements
  1282. Step 3: Connecting the Data Source to the authorBindingSource
  1283. Creating the DbContext Object
  1284. DisplayAuthorsTable_Load Event Handler
  1285. authorBindingNavigatorSaveItem_Click Event Handler: Saving Modifications to the Database
  1286. 22.6 Dynamically Binding Query Results
  1287. 22.6.1 Creating the Display Query Results GUI
  1288. Step 1: Creating the Project
  1289. Step 2: Creating a DataGridView to Display the Titles Table
  1290. Step 3: Adding a ComboBox to the Form
  1291. 22.6.2 Coding the Display Query Results App
  1292. Customizing the Form’s Load Event Handler
  1293. queriesComboBox_SelectedIndexChanged Event Handler
  1294. Ordering the Books By Title
  1295. Selecting Books with 2016 Copyright
  1296. Selecting Books with Titles That End in “How to Program”
  1297. 22.7 Retrieving Data from Multiple Tables with LINQ
  1298. 22.8 Creating a Master/Detail View App
  1299. 22.8.1 Creating the Master/Detail GUI
  1300. Step 1: Creating the Project
  1301. Step 2: Adding a Data Source for the Authors Table
  1302. Step 3: Creating GUI Elements
  1303. 22.8.2 Coding the Master/Detail App
  1304. 22.9 Address Book Case Study
  1305. 22.9.1 Creating the Address Book App’s GUI
  1306. Step 1: Creating a Class Library Project for the Entity Data Model
  1307. Step 2: Creating a Windows Forms Application Project for the AddressBook App
  1308. Step 3: Adding the Address Object as a Data Source
  1309. Step 4: Displaying the Details of Each Row
  1310. Step 5: Dragging the Address Data-Source Node to the Form
  1311. Step 5: Making the AddressID TextBox ReadOnly
  1312. Step 6: Adding Controls to Allow Users to Specify a Last Name to Locate
  1313. Step 7: Allowing the User to Return to Browsing All Rows of the Database
  1314. 22.9.2 Coding the Address Book App
  1315. Method RefreshContacts
  1316. Method Contacts_Load
  1317. Method addressBindingNavigatorSaveItem_Click
  1318. Method findButton_Click
  1319. Method browseAllButton_Click
  1320. 22.10 Tools and Web Resources
  1321. 22.11 Wrap-Up
  1322. Summary
  1323. Section 22.1 Introduction
  1324. Section 22.2 Relational Databases
  1325. Section 22.3 A Books Database
  1326. Section 22.4 LINQ to Entities and the ADO.NET Entity Framework
  1327. Section 22.5 Querying a Database with LINQ
  1328. Section 22.5.1 Creating the ADO.NET Entity Data Model Class Library
  1329. Section 22.5.2 Creating a Windows Forms Project and Configuring It to Use the Entity Data Model
  1330. Section 22.5.3 Data Bindings Between Controls and the Entity Data Model
  1331. Section 22.6 Dynamically Binding Query Results
  1332. Section 22.7 Retrieving Data from Multiple Tables with LINQ
  1333. Section 22.8 Creating a Master/Detail View App
  1334. Section 22.9 Address Book Case Study
  1335. Terminology
  1336. Self-Review Exercises
  1337. Answers to Self-Review Exercises
  1338. Exercises
  1339. 23 Asynchronous Programming with async and await
  1340. Objectives
  1341. Outline
  1342. 23.1 Introduction
  1343. 23.2 Basics of async and await
  1344. 23.2.1 async Modifier
  1345. 23.2.2 await Expression
  1346. 23.2.3 async, await and Threads
  1347. 23.3 Executing an Asynchronous Task from a GUI App
  1348. 23.3.1 Performing a Task Asynchronously
  1349. A Compute-Intensive Algorithm: Calculating Fibonacci Numbers Recursively
  1350. Exponential Complexity
  1351. 23.3.2 Method calculateButton_Click
  1352. 23.3.3 Task Method Run: Executing Asynchronously in a Separate Thread
  1353. 23.3.4 awaiting the Result
  1354. 23.3.5 Calculating the Next Fibonacci Value Synchronously
  1355. 23.4 Sequential Execution of Two Compute-Intensive Tasks
  1356. 23.5 Asynchronous Execution of Two Compute-Intensive Tasks
  1357. 23.5.1 awaiting Multiple Tasks with Task Method WhenAll
  1358. 23.5.2 Method StartFibonacci
  1359. 23.5.3 Modifying a GUI from a Separate Thread
  1360. 23.5.4 awaiting One of Several Tasks with Task Method WhenAny
  1361. 23.6 Invoking a Flickr Web Service Asynchronously with HttpClient
  1362. 23.6.1 Using Class HttpClient to Invoke a Web Service
  1363. 23.6.2 Invoking the Flickr Web Service’s flickr.photos.search Method
  1364. 23.6.3 Processing the XML Response
  1365. XML Elements and Attributes
  1366. Class XDocument and LINQ to XML
  1367. 23.6.4 Binding the Photo Titles to the ListBox
  1368. 23.6.5 Asynchronously Downloading an Image’s Bytes
  1369. 23.7 Displaying an Asynchronous Task’s Progress
  1370. 23.8 Wrap-Up
  1371. Summary
  1372. Section 23.1 Introduction
  1373. Section 23.2.1 async Modifier
  1374. Section 23.2.2 await Expression
  1375. Section 23.2.3 async, await and Threads
  1376. Section 23.3.1 Performing a Task Asynchronously
  1377. Section 23.3.2 Method calculateButton_Click
  1378. Section 23.3.3 Task Method Run: Executing Asynchronously in a Separate Thread
  1379. Section 23.3.4 awaiting the Result
  1380. Section 23.3.5 Calculating the Next Fibonacci Value Synchronously
  1381. Section 23.4 Sequential Execution of Two Compute-Intensive Tasks
  1382. Section 23.5 Asynchronous Execution of Two Compute-Intensive Tasks
  1383. Section 23.5.1 awaiting Multiple Tasks with Task Method WhenAll
  1384. Section 23.5.3 Modifying a GUI from a Separate Thread
  1385. Section 23.5.4 awaiting One of Several Tasks with Task Method WhenAny
  1386. Section 23.6 Invoking a Flickr Web Service Asynchronously with HttpClient
  1387. Section 23.6.1 Using Class HttpClient to Invoke a Web Service
  1388. Section 23.6.2 Invoking the Flickr Web Service’s flickr.photos.search Method
  1389. Section 23.6.3 Processing the XML Response
  1390. Section 23.6.4 Binding the Photo Titles to the ListBox
  1391. Section 23.6.5 Asynchronously Downloading an Image’s Bytes
  1392. Section 23.7 Displaying an Asynchronous Task’s Progress
  1393. Terminology
  1394. Self-Review Exercises
  1395. Answers to Self-Review Exercises
  1396. Exercises
  1397. Chapters on the Web
  1398. 24 XML and LINQ to XML
  1399. Objectives
  1400. Outline
  1401. 24.1 Introduction
  1402. 24.2 XML Basics
  1403. Viewing and Modifying XML Documents
  1404. Processing XML Documents
  1405. Validating XML Documents
  1406. Formatting and Manipulating XML Documents
  1407. 24.3 Structuring Data
  1408. Viewing an XML Document in Microsoft Edge
  1409. XML Markup for a Business Letter
  1410. 24.4 XML Namespaces
  1411. Differentiating Elements with Namespaces
  1412. Specifying a Default Namespace
  1413. Namespaces in XML Vocabularies
  1414. 24.5 Document Type Definitions (DTDs)
  1415. Creating a Document Type Definition
  1416. Defining Elements in a DTD
  1417. Defining Attributes in a DTD
  1418. Character Data vs. Parsed Character Data
  1419. Defining Empty Elements in a DTD
  1420. Well-Formed Documents vs. Valid Documents
  1421. 24.6 W3C XML Schema Documents
  1422. Validating Against an XML Schema Document
  1423. Creating an XML Schema Document
  1424. Defining an Element in XML Schema
  1425. A Closer Look at Types in XML Schema
  1426. XML Schema with Simple and Complext Types
  1427. Opening schema Tag
  1428. simpleType Element gigahertz
  1429. complexType Element CPU
  1430. complexType Element portable
  1431. Using the laptop Element
  1432. Automatically Creating Schemas using Visual Studio
  1433. 24.7 Extensible Stylesheet Language and XSL Transformations
  1434. A Simple XSL Example
  1435. XSL for Transforming sports.xml
  1436. stylesheet Start Tag
  1437. xsl:output element
  1438. xsl:template element
  1439. xsl: for-each element
  1440. Using XSLT to Sort and Format Data
  1441. Summary of XSL Style-Sheet Elements
  1442. 24.8 LINQ to XML: Document Object Model (DOM)
  1443. Reading an XML Document with an XDocument
  1444. 24.9 LINQ to XML Class Hierarchy
  1445. locateComboBox_SelectedIndexChanged Event Handler
  1446. PrintlDs Method
  1447. LINQ to XML Class Hierarchy
  1448. firstChildButtonJClick Event Handler
  1449. NodeText Method
  1450. Other Button Event Handlers
  1451. 24.10 LINQ to XML: Namespaces and Creating Documents
  1452. 24.11 XSLT with Class XslCompiledTransform
  1453. Performing an XSL Transformation in C# Using the .NET Framework
  1454. 24.12 Wrap-Up
  1455. Summary
  1456. Section 24.1 Introduction
  1457. Section 24.2 XML Basics
  1458. Section 24.3 Structuring Data
  1459. Section 24.4 XML Namespaces
  1460. Section 24.5 Document Type Definitions (DTDs)
  1461. Section 24.6 W3CXML Schema Documents
  1462. Section 24.7 Extensible Stylesheet Language and XSL Transformations
  1463. Section 24.8 LINQ to XML: Document Object Model (DOM)
  1464. Section 24.9 LINQ to XML Class Hierarchy
  1465. Section 24.10 LINQ to XML: Namespaces and Creating Documents
  1466. Section 24.11 XSLT with Class XslCompiledTransform
  1467. Terminology
  1468. Sections 24.1–24.7
  1469. Sections 24.8–24.11
  1470. Self-Review Exercises
  1471. Answers to Self-Review Exercises
  1472. Exercises
  1473. 25 GUI with Windows Presentation Foundation
  1474. Objectives
  1475. Outline
  1476. 25.1 Introduction
  1477. 25.2 Windows Presentation Foundation (WPF)
  1478. 25.3 Declarative GUI Programming Using XAML
  1479. 25.4 Creating a WPF App
  1480. 25.5 Laying Out Controls
  1481. 25.5.1 General Layout Principles
  1482. Size of a Control
  1483. Position of a Control
  1484. Other Layout Properties
  1485. 25.5.2 Layout in Action
  1486. GroupBox Control
  1487. StackPanel Control
  1488. Grid Control
  1489. Canvas Control
  1490. Layout in Design Mode
  1491. 25.6 Event Handling
  1492. 25.7 Commands and Common Application Tasks
  1493. 25.8 WPF GUI Customization
  1494. 25.9 Using Styles to Change the Appearance of Controls
  1495. 25.10 Customizing Windows
  1496. 25.11 Defining a Control’s Appearance with Control Templates
  1497. 25.12 Data-Driven GUIs with Data Binding
  1498. 25.13 Wrap-Up
  1499. Summary
  1500. Section 25.2 Windows Presentation Foundation (WPF)
  1501. Section 25.3 Declarative GUI Programming Using XAML
  1502. Section 25.4 Creating a WPF App
  1503. Section 25.5.1 General Layout Principles
  1504. Section 25.5.2 Layout in Action
  1505. Section 25.6 Event Handling
  1506. Section 25.7 Commands and Common Application Tasks
  1507. Section 25.8 WPF GUI Customization
  1508. Section 25.9 Using Styles to Change the Appearance of Controls
  1509. Section 25.10 Customizing Windows
  1510. Section 25.11 Defining a Control’s Appearance with Control Templates
  1511. Section 25.12 Data-Driven GUIs with Data Binding
  1512. Terminology
  1513. Self-Review Exercises
  1514. Answers to Self-Review Exercises
  1515. Exercises
  1516. 26 WPF Graphics and Multimedia
  1517. Objectives
  1518. Outline
  1519. 26.1 Introduction
  1520. 26.2 Controlling Fonts
  1521. 26.3 Basic Shapes
  1522. 26.4 Polygons and Polylines
  1523. 26.5 Brushes
  1524. ImageBrush
  1525. VisualBrush and MediaElement
  1526. Gradients
  1527. 26.6 Transforms
  1528. 26.7 WPF Customization: A Television GUI
  1529. WPF Effects
  1530. Creating Buttons on the TV
  1531. Creating the TV Interface
  1532. Creating the Reflection of the TV Screen
  1533. Skewing the GUI Components to Create a 3-D Look
  1534. Examining the Code-Behind Class
  1535. 26.8 Animations
  1536. 26.9 Speech Synthesis and Speech Recognition
  1537. Instance Variables
  1538. Constructor
  1539. Method SpeechButton_Click
  1540. Method Image_MouseDown
  1541. Method myGrammar_SpeechRecognized
  1542. Method DisplaySpeak
  1543. 26.10 Wrap-Up
  1544. Summary
  1545. Section 26.1 Introduction
  1546. Section 26.2 Controlling Fonts
  1547. Section 26.3 Basic Shapes
  1548. Section 26.4 Polygons and Polylines
  1549. Section 26.5 Brushes
  1550. Section 26.6 Transforms
  1551. Section 26.7 WPF Customization: A Television GUI
  1552. Section 26.8 Animations
  1553. Section 26.9 Speech Synthesis and Speech Recognition
  1554. Terminology
  1555. Self-Review Exercises
  1556. Answers to Self-Review Exercises
  1557. Exercises
  1558. 27 ATM Case Study, Part 1: Object-Oriented Design with the UML
  1559. Objectives
  1560. Outline
  1561. 27.1 Introduction
  1562. 27.2 Examining the ATM Requirements Document
  1563. Requirements Document
  1564. Analyzing the ATM System
  1565. Use Case Diagrams
  1566. Designing the ATM System
  1567. Web Resources
  1568. Self-Review Exercises
  1569. 27.3 Identifying the Classes in the ATM Requirements Document
  1570. Identifying the Classes in a System
  1571. Modeling Classes
  1572. Self-Review Exercises
  1573. 27.4 Identifying Class Attributes
  1574. Identifying Attributes
  1575. Modeling Attributes
  1576. Self-Review Exercises
  1577. 27.5 Identifying Objects’ States and Activities
  1578. State Machine Diagrams
  1579. Activity Diagrams
  1580. Self-Review Exercises
  1581. 27.6 Identifying Class Operations
  1582. Identifying Operations
  1583. Modeling Operations
  1584. Operations of Class BankDatabase and Class Account
  1585. Operations of Class Screen
  1586. Operations of Class Keypad
  1587. Operations of Class CashDispenser and Class DepositSlot
  1588. Operations of Class ATM
  1589. Identifying and Modeling Operation Parameters
  1590. Self-Review Exercises
  1591. 27.7 Identifying Collaboration Among Objects
  1592. Identifying the Collaborations in a System
  1593. Interaction Diagrams
  1594. Communication Diagrams
  1595. Sequence of Messages in a Communication Diagram
  1596. Sequence Diagrams
  1597. Self-Review Exercises
  1598. 27.8 Wrap-Up
  1599. Answers to Self-Review Exercises
  1600. 28 ATM Case Study, Part 2: Implementing an OO Design in C#
  1601. Objectives
  1602. Outline
  1603. 28.1 Introduction
  1604. 28.2 Starting to Program the Classes of the ATM System
  1605. 28.3 Incorporating Inheritance and Polymorphism into the ATM System
  1606. 28.4 ATM Case Study Implementation
  1607. 28.4.1 Class ATM
  1608. Implementing the Operation
  1609. Authenticating the User
  1610. Performing Transactions
  1611. Creating Transactions
  1612. 28.4.2 Class Screen
  1613. 28.4.3 Class Keypad
  1614. 28.4.4 Class CashDispenser
  1615. 28.4.5 Class DepositSlot
  1616. 28.4.6 Class Account
  1617. public Read-Only Properties of Class Account
  1618. public Methods of Class Account
  1619. 28.4.7 Class BankDatabase
  1620. private Utility Method GetAccount
  1621. public Methods
  1622. 28.4.8 Class Transaction
  1623. 28.4.9 Class BalanceInquiry
  1624. 28.4.10 Class Withdrawal
  1625. Overriding abstract Method Execute
  1626. Displaying Options With private Utility Method DisplayMenuOfAmounts
  1627. 28.4.11 Class Deposit
  1628. Overriding abstract Method Execute
  1629. Getting Deposit Amount with private Utility Method PromptForDepositAmount
  1630. 28.4.12 Class ATMCaseStudy
  1631. 28.5 Wrap-Up
  1632. Answers to Self-Review Exercises
  1633. 29 Web App Development with ASP.NET: A Deeper Look
  1634. Objectives
  1635. 29.1 Introduction
  1636. 29.2 Case Study: Password-Protected Books Database App
  1637. 29.2.1 Examining the ASP.NET Web Forms Application Template
  1638. Executing the Website
  1639. Navigation and Pages
  1640. Login and Registration Support
  1641. 29.2.2 Test-Driving the Completed App
  1642. Logging Out of the Website
  1643. 29.2.3 Configuring the Website
  1644. Step 1: Opening the Website
  1645. Step 2: Setting Up Website Folders
  1646. Step 3: Importing the Website Header Image
  1647. Step 4: Opening the Web Site Administration Tool
  1648. Step 5: Configuring the Website’s Security Settings
  1649. 29.2.4 Modifying the Home and About Pages
  1650. Modifying the Home Page
  1651. Modifying the About Page
  1652. 29.2.5 Creating a Content Page That Only Authenticated Users Can Access
  1653. 29.2.6 Linking from the Default.aspx Page to the Books.aspx Page
  1654. 29.2.7 Modifying the Master Page (Site.master)
  1655. Inserting an Image in the Header
  1656. Adding a Books Link to the Navigation Links
  1657. 29.2.8 Customizing the Password-Protected Books.aspx Page
  1658. Creating the Entity Data Model for the Books Database
  1659. Adding a DropDownList to Display the Authors’ First and Last Names
  1660. Creating a GridView to Display the Selected Author’s Books
  1661. Code-Behind File for the Books Page
  1662. Page_Load Event Handler
  1663. authorsDropDownList_SelectedIndexChanged Event Handler
  1664. 29.3 ASP.NET Ajax
  1665. 29.3.1 Traditional Web Apps
  1666. 29.3.2 Ajax Web Apps
  1667. 29.3.3 Testing an ASP.NET Ajax App
  1668. Testing the App in Your Default Web Browser
  1669. 29.3.4 The ASP.NET Ajax Control Toolkit
  1670. Using NuGet to Download the Ajax Control Toolkit and Add It to the Project
  1671. Adding the ASP.NET Ajax Controls to the Toolbox
  1672. 29.3.5 Using Controls from the Ajax Control Toolkit
  1673. 29.3.6 ToolkitScriptManager
  1674. 29.3.7 Grouping Information in Tabs Using the TabContainer Control
  1675. 29.3.8 Partial-Page Updates Using the UpdatePanel Control
  1676. 29.3.9 Adding Ajax Functionality to ASP.NET Validation Controls Using Ajax Extenders
  1677. 29.3.10 Changing the Display Property of the Validation Controls
  1678. 29.3.11 Running the App
  1679. 29.4 Wrap-Up
  1680. Self-Review Exercises
  1681. Answers to Self-Review Exercises
  1682. Exercises
  1683. 30 Web Services
  1684. Objectives
  1685. Outline
  1686. 30.1 Introduction
  1687. 30.2 WCF Services Basics
  1688. 30.3 HTTP get and post Requests
  1689. 30.4 Representational State Transfer (REST)
  1690. 30.5 JavaScript Object Notation (JSON)
  1691. 30.6 Publishing and Consuming REST-Based XML Web Services
  1692. 30.6.1 WCF Web Service Project
  1693. 30.6.2 Implementing a REST-Based XML WCF Web Service
  1694. Web Service Interface
  1695. WebGet Attribute
  1696. Web Service Implementation
  1697. 30.6.3 Building a REST WCF Web Service
  1698. Step 1: Creating the Project
  1699. Step 2: Examining the Newly Created Project
  1700. Step 3: Modifying and Renaming the Code-Behind File
  1701. Step 4: Modifying the Web.config File to Enable REST Architecture
  1702. 30.6.4 Deploying the WelcomeRESTXMLService
  1703. Testing the Web Service
  1704. 30.6.5 Consuming a REST-Based XML WCF Web Service
  1705. 30.7 Publishing and Consuming REST-Based JSON Web Services
  1706. 30.7.1 Creating a REST-Based JSON WCF Web Service
  1707. 30.7.2 Consuming a REST-Based JSON WCF Web Service
  1708. 30.8 Equation Generator: Returning User-Defined Types
  1709. 30.8.1 Creating the REST-Based XML EquationGenerator Web Service
  1710. 30.8.2 Consuming the REST-Based XML EquationGenerator Web Service
  1711. Difficulty Level and the Arithmetic Operation to Perform
  1712. Invoking the EquationGeneratorService
  1713. Processing the XML Response
  1714. Checking Whether the User Entered the Correct Answer
  1715. 30.8.3 Creating the REST-Based JSON WCF EquationGenerator Web Service
  1716. 30.8.4 Consuming the REST-Based JSON WCF EquationGenerator Web Service
  1717. 30.9 Wrap-Up
  1718. Self-Review Exercises
  1719. Answers to Self-Review Exercises
  1720. Exercises
  1721. 31 Building a Windows Azure™ Cloud Computing App
  1722. Objectives
  1723. Outline
  1724. 31.1 Introduction
  1725. 31.2 Installing the Windows Azure SDK for Visual Studio 2012
  1726. 31.3 Windows Azure Cloud Services Accounts
  1727. 31.3.1 Signing Up for a Windows Azure Cloud Services Account
  1728. 31.3.2 Windows Azure Educator Grant
  1729. 31.3.3 Windows Azure for MSDN Subscribers
  1730. 31.4 Favorite Twitter Searches: Introduction
  1731. 31.5 Favorite Twitter Searches: Test-Drive
  1732. 31.6 Favorite Twitter Searches: Technologies Overview
  1733. 31.7 Favorite Twitter Searches: Code
  1734. 31.7.1 TableEntity for Storing Data in Windows Azure Table Storage
  1735. 31.7.2 Storing and Retrieving TableEntity Objects
  1736. FTSForm Instance Variables and Constructor
  1737. CloudStorageAccount
  1738. CloudTableClient
  1739. CloudTable
  1740. manageSearchesButton_Click Event Handler
  1741. LoadSearches Method—Querying the Table Storage Service
  1742. saveSearchButton_Click Event Handler
  1743. tagsListBox_SelectedIndexChanged Event Handler
  1744. 31.8 Security, Privacy and Reliability
  1745. 31.9 Microsoft Windows Azure Resources
  1746. 31.10 Microsoft Windows Azure Code Samples
  1747. 31.11 Additional Web Resources
  1748. 31.12 Wrap-Up
  1749. Self-Review Exercises
  1750. Answers to Self Review Exercises
  1751. Exercise
  1752. A Operator Precedence Chart
  1753. B Simple Types
  1754. C ASCII Character Set
  1755. Appendices on the Web
  1756. D Number Systems
  1757. Objectives
  1758. Outline
  1759. D.1 Introduction
  1760. D.2 Abbreviating Binary Numbers as Octal and Hexadecimal Numbers
  1761. D.3 Converting Octal and Hexadecimal Numbers to Binary Numbers
  1762. D.4 Converting from Binary, Octal or Hexadecimal to Decimal
  1763. D.5 Converting from Decimal to Binary, Octal or Hexadecimal
  1764. D.6 Negative Binary Numbers: Two’s Complement Notation
  1765. Summary
  1766. Terminology
  1767. Self-Review Exercises
  1768. Answers to Self-Review Exercises
  1769. Exercises
  1770. E UML 2: Additional Diagram Types
  1771. E.1 Introduction
  1772. E.2 Additional Diagram Types
  1773. F Unicode®
  1774. Objectives
  1775. Outline
  1776. F.1 Introduction
  1777. F.2 Unicode Transformation Formats
  1778. F.3 Characters and Glyphs
  1779. F.4 Advantages/Disadvantages of Unicode
  1780. F.5 Using Unicode
  1781. F.6 Character Ranges
  1782. Summary
  1783. Terminology
  1784. Self-Review Exercises
  1785. Answers to Self-Review Exercises
  1786. Exercises
  1787. G Using the Visual Studio Debugger
  1788. Objectives
  1789. Outline
  1790. G.1 Introduction
  1791. G.2 Breakpoints and the Continue Command
  1792. G.3 DataTips and Visualizers
  1793. G.4 The Locals and Watch Windows
  1794. G.5 Controlling Execution Using the Step Into, Step Over, Step Out and Continue Commands
  1795. G.6 Other Debugging Features
  1796. G.6.1 Exception Assistant
  1797. G.6.2 Just My Code™ Debugging
  1798. G.6.3 Other Debugger Features
  1799. G.7 Wrap-Up
  1800. Index
  1801. Symbols
  1802. Numerics

People also search:

visual c# how to program 6th edition solutions

visual c# how to program

visual c# how to program 6/e free download

c# .net 6 tutorial

visual basic 6 programming

Visual C# How to Program 6th Edition Deitel Solutions Manual

 

Instant download after Payment is complete

Main Menu