Dive into C# functions with this comprehensive course. Learn about creating functions, using parameters, setting parameters as optional, passing arguments by reference, and inline functions in C#. Join Cosmo as he programs various mission functions to control his spacecraft.
Overview
Syllabus
- Lesson 1: Creating a Function and Using Return
- Define and Use a Function
- Change a Function to Void
- Fix the Function Bug
- Complete the Engine Status Function
- Creating and Calling a Function
- Lesson 2: Understanding Function Parameters
- Function Parameters in Action
- Run a Function with Named Parameters
- Naming the Parameter Passed
- Fixing Function Parameter Types
- Complete the Launch Function
- Write a Parameterized Function
- Lesson 3: Exploring Optional Parameters
- Using Optional Parameters in Functions
- Change Default Values in Functions
- Fix the Optional Parameter Function
- Complete ReportStatus with Optional Parameters
- Write a Status Report Function
- Lesson 4: Passing Arguments by Value and Reference
- Understanding Value vs Reference
- Switching Parameter Passing Methods
- Find and Fix the Bug
- Complete the Fuel Functions
- Passing Arguments Mastery Task
- Lesson 5: Discovering Inline Functions
- Inline Functions in Action
- Coverting a Function to Inline
- Change Return Type of Inline Function
- Fix Inline Function Bug
- Write Compact C# Functions