
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
In this course, students will learn elementary programming concepts using the C# language, with an additional section on Java and its relationship to C #. Learning C# will allow students to develop the basic skills for functional and object-oriented programming and the fundamentals of polymorphism and imperative programming, as well as a short study of Java. Students can use this knowledge to learn other higher-level languages (e.g., C++, Swift, and Python) more quickly. The class will focus on building programming skills from fundamental keywords to high-level abstraction, with the hope that the student will continue learning other high-level programming concepts afterward.
Students will learn the following aspects of programming using the C# language:
Section 1: Variables and Arithmetic
-Introduction, how to succeed in the course
-What is C#, understanding programming, and setup
-Hello World
-Variables, Data Types, Getting User Input
-Commenting, Constants
-Arithmetic Operators
Section 2: Decision Statements
-If-else Statements, Switches, Ternary Operator
-Logical Operators, Conditional Operators, Compound Conditions
-While Loop, For Loop
-Assignment and Increment/Decrement Operators
-Do-While Loop, break, and continue
-Random Number Generation
Section 3: Data Structures, Exceptions, Strings, and File IO
-Arrays and Foreach Loops, Nullable Types
-Multidimensional Arrays, Jagged Arrays, Array Properties and Methods
-Working with Strings, String Functions
-Lists
-Exception Handling
-Working with Files
Section 4: Methods, Classes, and Objects
-Introduction to Methods, Parameters
-Optional and Named Arguments, Passing Arguments
-Method Overloading/Overriding, Tuples
-Recursion
-Classes and Objects, Records, the var Keyword
-Properties and Fields (get, set)
-Encapsulation, Constructors, and Records
-Windows Form Programs (WFP) and Partial Classes with Visual Studio
Section 5: Inheritance and Advanced Classes
-Inheritance, Protected Members, Derived Class Constructors/Destructor
-Interfaces, Abstract Classes, and Polymorphism (Overriding/Overloading)
-Null-Forgiving and Coalescing Operators
-Destructors and Virtual Methods
-Indexers, Operator Overloading, and Extension Methods
-Static Members/Classes
-Value and Reference Types, ref, in, and out
-Structs and Enums
-Generic Methods and Classes
Section 6: Java
-Differences between C# and Java
-Input and Output
-Working with Files, Enhanced-For Loop
-Arrays
-Java Collections
-Classes and Inheritance
Section 7: Capstone
-Final exam
-Capstone project
Optional textbooks:
-**"C# Programming Yellow Book" by Rob Miles, available for free at Miles' website (linked in the Lecture 1 resources) -- this is one of my favorite programming textbooks to both read from and teach with, and is one of the best books on the subject
-**"The C# Player's Guide, 5th Edition" by RB Whitaker -- very great structure, closest textbook to what I believe is an effective learning order, and gamifies learning to make it more fun
-"Murach's C#, 8th Edition" by Anne Boehm and Joel Murach -- great if you want to focus on learning the concepts through making Windows Form Apps, which is how I traditionally teach C# in a classroom setting
-"C# 8.0 and .NET Core 3.0 – Modern Cross-Platform Development: Build Applications with C#, .NET Core, Entity Framework Core, ASP.NET Core, and ML .NET Using Visual Studio Code, 4th Edition" by Mark J. Price (Various prices by format and rental)
-"Blue Pelican Java" by Charles Cook -- fairly old, but still an incredibly useful desk reference for learning Java
Future topics to study (which may be added later or made into a second class):
Advanced Operations, Generic Typing, and Collections
-DateTime
-Bitwise Operators and Operations
-Nested Classes, Namespaces, readonly and internal
-Hybrid Unions, and Sealed Classes
-Sizeof, nameof, goto, and params
-Collections, Iterators, and yield
-Stack and Queue
-HashSet and Dictionary
-BitArray
Advanced C# Concepts
-Parallel Programming: Threads and Timers
-Parallel Methods, Asynchronous Methods, Tasks, await
-Introduction to LINQ
-Memory Management
-Reflection
-Null Conditional Operators
-Namespace Aliasing, the :: operator
-Lambda Expressions, Delegate Functions, and dynamic
-Unsafe, Volatile
-Manual Garbage Collection
-Unit Testing