Search
Introduction to Programming in C#
Summary
Expanded
Chapters
¶
1. Introduction
1.1. Why Learn To Code?
1.2. Why Learn C Sharp?
1.3. About LaunchCode Programs
1.4. Class Platforms
1.5. Using This Book
2. How Programs Work
2.1. Introduction
2.2. Programming Languages
2.3. The C# Language
2.4. Your First Program
3. How To Write Code
3.1. What is Code?
3.2. Syntax Rules
3.3. Comments
3.4. Output With
Console.WriteLine
3.5. Fixing Errors in Your Code
3.6. Welcome, Novice Coder
4. Data and Variables
4.1. Values and Data Types
4.2. More On Data Types
4.3. Type Conversion
4.4. Variables
4.5. More On Variables
4.6. Expressions and Evaluation
4.7. Operations
4.8. Other Operators
4.9. Input with
ReadLine
4.10. Exercises: Data and Variables
4.11. Studio: Data and Variables
5. Making Decisions With Conditionals
5.1. Booleans
5.2. Logical Operators
5.3. Conditionals
5.4. Nested Conditionals
5.5. Exercises: Booleans and Conditionals
5.6. Studio: Goal Setting and Getting into the Right Mindset
6. Errors and Debugging
6.1. What is Debugging?
6.2. Categories of Errors
6.3. Diagnosing Error Messages
6.4. Debugging Logic Errors
6.5. Errors and User Input
6.6. How to Avoid Debugging
6.7. Asking Good Questions
6.8. Exercises: Debugging
7. Stringing Characters Together
7.1. Strings as Collections
7.2. Bracket Notation
7.3. Strings as Objects
7.4. String Immutability
7.5. String Methods
7.6. Encoding Characters
7.7. Special Characters
7.8. String Interpolation
7.9. Exercises: Strings
8. Arrays Keep Things in Order
8.1. Arrays Are Like Strings
8.2. Working With Arrays
8.3. Array Methods
8.4. Multidimensional Arrays
8.5. Exercises: Arrays
8.6. Studio: Strings and Arrays
9. Repeating With Loops
9.1. Iteration
9.2.
for
Loops
9.3. Iterating Over Collections
9.4. Breaking Down the
for
Statement
9.5. The Accumulator Pattern
9.6.
while
Loops
9.7. Terminating a Loop With
break
9.8. Choosing Which Loop to Use
9.9. Exercises: Loops
9.10. Studio: Loops
10. Control Flow and Collections
10.1.
switch
Statements vs.
else
if
10.2. More Loops and Break Statements
10.3. Collections
10.4. Lists
10.5. List Gradebook
10.6. Array
10.7. Dictionary
10.8. Dictionary Gradebook
10.9. Exercises: Control Flow and Collections
10.10. Studio: Counting Characters
11. Methods
11.1. Introduction
11.2. Method Signatures and Calls
11.3. Using Methods
11.4. Recursive Methods
11.5. Scope
11.6. Exercises: Methods
11.7. Studio: Methods
12. Classes, Objects, and Math Class
12.1. Classes: A Primer
12.2. Classes, Objects, and Methods! Oh My!
12.3. The
Math
Class
13. Terminal
13.1. What is a terminal?
13.2. Filesystem and Paths
13.3. How to Do Stuff in the Terminal
13.4. Running Programs in the Terminal
13.5. Exercises: Terminal
14. Visual Studio Setup
14.1. Welcome to Visual Studio
14.2. Windows Users: Visual Studio Community Edition
14.3. Mac Users: Visual Studio for Mac
14.4. Creating a C# Project
14.5. Cloning a C# Project
14.6. C# Naming Conventions
15. Git More Collaboration
15.1. What is Git?
15.2. Repositories and Commits
15.3. Remote Repositories
15.4. Git Branches
15.5. Merging in Git
15.6. Exercises: Git
15.7. Studio: Communication Log
15.8. Studio: Communication Log (continued)
15.9. Bonus Mission: Merge Conflicts!
16. Rules to the Exceptions
16.1. Exceptions
16.2. Handling Exceptions
16.3. Common Exception Objects
16.4. Exercises: Exceptions
17. Tools in Visual Studio
17.1. NuGet
17.2. Debugger
17.3. Studio: If It Ain’t Broke, Add a Breakpoint!
18. Classes in C#, Part 1
18.1. Classes for C#
18.2. Modifiers in C#
18.3. Encapsulation
18.4. Constructors
18.5. Methods
18.6. Single Responsibility Principle
18.7. Exercises: Classes and Objects
18.8. Studio: Restaurant Menu
19. Classes and Objects, Part 2
19.1. Customizing Fields
19.2. Instance and Static Methods
19.3. Special Methods And Classes
19.4. Visual Studio Generator Shortcut
19.5. Exercises: Objects and Classes, Part 2
19.6. Studio: Restaurant Menu Continued
20. Unit Testing
20.1. Why Test Your Code?
20.2. Testing in C#
20.3. Unit Testing In Action With MSTest
20.4. Running Tests in Visual Studio
20.5. Running Tests Part 2:
20.6. Test-Driven Development
20.7. The Red, Green, Refactor Methodology
20.8. Exercises: Unit Testing
20.9. Studio: Unit Testing
21. Inheritance
21.1. Inheritance in OOP
21.2. Inheritance in C#
21.3. A Tale of Two Cats
21.4. Inheriting from Abstraction
21.5. Casting
21.6. Testing Inheritance
21.7. Class Diagrams
21.8. Exercises: Inheritance
21.9. Studio: Fun with Quizzes
22. Interfaces and Polymorphism
22.1. Introduction
22.2. Interfaces
22.3. Interfaces and Abstract Classes
22.4. Interfaces In The Wild
22.5. Unit Testing and Interfaces
22.6. Exercises: Interfaces and Polymorphism
22.7. Studio: Spinning the Discs
23. We Built the Internet on HTML
23.1. Background
23.2. HTML Structure
23.3. HTML Tags
23.4. How to Create an HTML Page in Visual Studio
23.5. Exercises: HTML
23.6. Studio: Making Headlines
24. Styling the Web With CSS
24.1. What is CSS?
24.2. CSS Structure
24.3. CSS Rules
24.4. Exercises: CSS
25. HTTP: The Postal Service of the Internet
25.1. How the Internet Works
25.2. HTTP at a Glance
25.3. Requests
25.4. Responses
25.5. HTTP in the Browser
26. User Input with Forms
26.1. Forms
26.2. Form Submission
26.3. POST Form Submission
26.4. Text Inputs
26.5. Specialized Text Inputs
26.6. Checkbox Input
26.7. Radio Input
26.8. Select Input
26.9. Exercises: Forms
26.10. Studio: HTTP and Forms
Index
Studios
¶
4.11. Studio: Data and Variables
5.6. Studio: Goal Setting and Getting into the Right Mindset
8.6. Studio: Strings and Arrays
9.10. Studio: Loops
10.10. Studio: Counting Characters
11.7. Studio: Methods
15.7. Studio: Communication Log
17.3. Studio: If It Ain’t Broke, Add a Breakpoint!
18.8. Studio: Restaurant Menu
19.6. Studio: Restaurant Menu Continued
20.9. Studio: Unit Testing
21.9. Studio: Fun with Quizzes
22.7. Studio: Spinning the Discs
23.6. Studio: Making Headlines
26.10. Studio: HTTP and Forms
Assignments
¶
Assignment #1: Candidate Testing
Assignment #2: Scrabble Scorer
Assignment #3: Mars Rover
Assignment #4: HTML Me Something
Appendices
¶
Best Practices: Learning To Code
String Method Examples
Array Method Examples
Loop Examples
List Method Examples
Dictionary Method Examples
Math
Class Methods
Setting up Software for the Class
Terminal Commands
Visual Studio Operational Tips
Git Stash
Git Workflows
Creating a New Visual Studio Repo for GitHub