Add logic to C# console applications (Get started with C#, Part 3)
Offered By: Microsoft via Microsoft Learn
Course Description
Overview
- Module 1: Learn the operators and techniques required to evaluate and compare values in your decision statements.
- Use operators to create Boolean expressions that test for comparison and equality.
- Use built-in methods to the string class to perform better evaluations on strings.
- Use the negation operator to test for the opposite of a given condition.
- Use the conditional operator to perform an inline evaluation.
- Module 2: Use code blocks with more confidence, understanding how they impact the visibility and accessibility of both higher and lower-level constructs in your code.
- Understand the impact of declaring and initializing variables inside and outside of code blocks.
- Remove code blocks in if statements when there's only one line of code in the body of the code block to improve readability.
- Identify namespaces, classes, and methods in your code.
- Understand how moving methods into new classes, and classes into new namespaces impacts the visibility of the code.
- Understand the use of the using statement to instruct the compiler where to look for classes referenced in your code.
- Module 3: Learn how to add branching logic that matches one variable or expression against many possible values.
- Use the switch-case construct to match a variable or expression against several possible outcomes.
- Convert code that uses an if-elseif-else construct into a switch-case construct.
- Module 4: Use the `for` iteration statement to loop a pre-set number of times and control the iteration process.
- Use the for statement to loop through a block of code.
- Modify how the .NET Runtime executes the looping logic, changing the value of the iterator, the condition and the pattern.
- Module 5: Use the `do-while` and `while` statements to iterate as long as a Boolean expression evaluates to true.
- Write code that uses the do-while statement to iterate through a code block.
- Write code that uses the while statement to iterate through a code block.
- Use the continue statement to step directly to the Boolean evaluation.
In this module, you will:
In this module, you will:
In this module, you will:
In this module, you will:
In this module, you will:
Syllabus
- Module 1: Evaluate Boolean expressions to make decisions in C#
- Introduction
- Exercise - Boolean Expressions
- Exercise - conditional operator
- Challenge
- Solution
- Challenge
- Solution
- Knowledge Check
- Summary
- Module 2: Control variable scope and logic using code blocks in C#
- Introduction
- Exercise - Code blocks and variable scope
- Code blocks define methods, classes, and namespaces
- Exercise - Remove code blocks in if statements
- Challenge
- Solution
- Knowledge Check
- Summary
- Module 3: Branch the flow of code using the switch-case construct in C#
- Introduction
- Exercise - Use the switch case statement
- Challenge
- Solution
- Knowledge check
- Summary
- Module 4: Iterate through a code block using for statement in C#
- Introduction
- Exercise - for iteration statement
- Challenge
- Solution
- Knowledge check
- Summary
- Module 5: Add looping logic to your code using the do-while and while statements in C#
- Introduction
- Exercise - do-while, while, and continue statements
- Challenge
- Solution
- Knowledge check
- Summary
Tags
Related Courses
Building Modern .NET Applications on AWSAmazon Web Services via edX Building Modern .NET Applications on AWS
Amazon Web Services via Coursera Modern Application Development with .NET on AWS
Amazon Web Services via Coursera Blazor and JavaScript Interoperability
Coursera Project Network via Coursera Web Development with ASP.NET C# and Entity Framework Code-First
Canvas Network