Introduction
C# Fundamentals: Course Preview
.NET, C# and Visual Studio Overview
.NET and C# Overview
The CLR and the .NET Runtime
Why So Many Different .NET Versions?
How the .NET Compilers Work
Tools and Resources to Help You
A Quick Overview of C#
Download and Install Visual Studio
C# Project Types and Creating a Console Application
Create a Console Application Using Visual Studio 2022
Download and Install Visual Studio Code
Create a Console App in VS Code
Create a Console Application Using VS Code
Test Your Knowledge on .NET and C#
Declaring and Working with Variables
What is a Variable
The Many Data Types of C#
Declaring Variables
Declare and Assign Values to Variables
The Object Data Type
Default Values of Data Types
Nullable Data Types
Lab
Test your knowledge on C# data types and variables
Sample Code Demonstrated in this Section
The Rich Set of C# Operators
Using the Mathematical Operators of C#
Lab: Mathematical Operators
Unary Operators Can Save Typing
Lab: Unary Operators
Relational Operators Such as Less Than and Greater Than
Lab: Relational Operators
The Logical Operators And, Or and Not
Lab: Logical Operators
Order of Precedence for Operators
Test your knowledge of C# operators
Sample Code Demonstrated in this Section
Making Decisions in C#
An Introduction to If Statements in C#
Writing If and Else Statements in C#
Lab: If Else Statements
Using the Ternary Conditional Operator
Lab: Ternary Operator
The C# Switch Statement
Lab: Switch Statement
The Null Conditional and Coalescing Operators
Lab: Null Coalescing
Checking Types with the Is Operator
The Built-In Preprocessor Directives and Conditional Compile
Creating Your Own Custom Conditional Compile Constants
Test your knowledge of C# decision-making constructs
Sample Code Demonstrated in this Section
How to Loop Over Data in C#
Overview of Looping and While Loop Demo
Lab: While Loop
Using the do while Loop
Demo of the for next Loop
Lab: For Loop
The foreach Loop and the break Statement
Test your knowledge of the C# looping constructs.
Sample Code Demonstrated in this Section
Object-Oriented Programming in C#
What is a Class
Objects, Properties and Methods
Namespaces and Inheritance
Overview of the Different Property Creation Methods
Create a Product Class Using Visual Studio
Add Properties to the Product Class
Lab: Class Properties
A Cleaner Method to Instantiate a Class
Using the Full Property Syntax
Create Method to Calculate the Profit of a Product
Debugging the Calculate Profit Method
Lab: Void Method
Create Method to Calculate the Number of Selling Days
Lab: Method
Test your knowledge of C# OOP Principles
Sample Code Demonstrated in this Section
Using Arrays and the ArrayList Class
Creating a Single Dimensional Array
Changing and Adding Array Elements
Removing an Array Element
Multi-Dimensional Arrays
Sample Code for Array Demonstrations
Working with the ArrayList Class
Manipulating Data in the ArrayList
Sample Code for ArrayList Demonstrations
Powerful String Manipulations in C#
Declaring and Initializing Strings
The Immutability of Strings
Learning the Properties of the String Class
Lab: Range Operator
Trying out the Compare Method
Extract Pieces of a String Using the Substring Method
The Contains, EndsWith, StartsWith and IsNullOrEmpty Methods
Lab: Contains
Lab: EndsWith
The IndexOf and LastIndexOf Methods
Lab: LastIndexOf
The Split and Join Methods
Lab: Join
The Format, ToLower, ToUpper, and Trim Methods
Lab: Format
Using Escape Sequences in Strings
Verbatim String Literals
String Interpolation
Lab: String Interpolation
Using the StringBuilder Class
Lab: StringBuilder Class
Test your knowledge of the C# string handling capabilities
Sample Code Demonstrated in this Section
Manage Numbers, Dates, and Times in C#
Working with the Integer Data Type
Lab: Integer Data Type
Working with Floating Point Data Types
Lab: Decimal Data Type
Sample Code for Numeric Data Types
DateTime Properties
Lab: Date Parts
DateTime Methods and Formatting
Lab: Date Method
DateTime Standard and Custom Formats
Using the DateOnly and TimeOnly Structures
Test your knowledge of the C# Numbers and Date/Time structures
Sample Code for DateTime Data Types
Converting Data From One Type to Another
How Numeric Conversions Work and Implicit Conversions
Working with Explicit Numeric Conversions
Lab: Decimal to Integer
Converting Strings to Numbers
Explicit Conversion from String to DateTime
Number to String Conversions
Lab: Decimal to String
Test your knowledge of C# conversions
Sample Code Demonstrated in this Section
Exception Handling Made Easy in C#
How .NET Exception Handling Works
Seeing What Happens Where There is No Error Handling
Adding a Simple TryโฆCatch Block
Lab: Try…Catch
Checking Out the Exception Object
Lab: Exception Object
Using the Finally Block
Working with Specific Exceptions
Demo of Specific Exceptions Being Thrown
Lab: Specific Exceptions
Sample Code for Basic Exception Handling
What is Exception Bubbling
Throwing an Exception in the Example Code
Creating a User-Defined Exception
Throwing and Catching Your User-Defined Exception
Test your knowledge of the C# exception handling techniques
Sample Code for Throwing and Creating Custom Exceptions
Creating a C# Application From All You Have Learned
The C# Application You are Going to Build
A Look at the Completed Application
The CheckFileSize() Method
The ReadProductFile() Method
The ProcessProductLines() Method
The GetProducts() Method
The ToString() Method
Build & Display the Array of Products
Lab: Build a Set of Customers
Sample Code Demonstrated in this Section
Summary and Where To Go From Here