Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Microsoft

Create and run simple C# console applications (Get started with C#, Part 2)

Microsoft via Microsoft Learn

Overview

Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
  • Learn how to configure Visual Studio Code for C# and how to use this professional IDE to create and run console applications.

    In this module, you will:

    • Configure Visual Studio Code and your development environment for programming in C#.

    • Explore the Visual Studio Code user interface.

    • Create, edit, build, and run a console application using Visual Studio Code.

  • Use functionality in the .NET Class Library by calling methods that return values, accept input parameters, and more.

    In this module, you will:

    • Write code that calls stateless methods in the .NET Class Library.

    • Create a new instance of .NET Class Library classes to call methods that maintain state.

    • Use IntelliSense to learn more about a method, its overloaded versions, its return value data type, and its input parameter data types.

    • Use Microsoft Learn documentation to research what a method does, its overloaded versions, its return value type, its input parameters and what each parameter represents.

  • Learn to branch your code's execution path by evaluating Boolean expressions.

    In this module, you will:

    • Write code that evaluates conditions using if, else, and else if statements.

    • Build Boolean expressions to evaluate a condition.

    • Combine Boolean expressions using logical operators.

    • Nest code blocks within other code blocks.

  • Learn to create array variables and iterate through elements of the array.

    In this module, you will:

    • Create and initialize a new array.

    • Set and get values in arrays.

    • Iterate through each element of an array using the foreach statement.

  • Write code that is easier to read, update and support using naming conventions, comments and whitespace.

    In this module, you will:

    • Choose descriptive names for variables that describe their purpose and intent.

    • Use code comments to temporarily instruct the compiler to ignore lines of code.

    • Use code comments to describe higher-level requirements or purpose for a passage of code.

    • Write code that effectively uses whitespace to convey the relationship of lines of code.

  • Gain experience developing a console app that implements arrays, foreach loops, and if statements to achieve app specifications.

    In this module, you'll practice how to:

    • Use Visual Studio Code to develop a C# console application that uses foreach loops to access array data.

    • Use if statements to evaluate conditions and create code branches.

  • Demonstrate your ability to update a console app that implements arrays, foreach loops, and if statements in response to a user requested feature update.

    In this module, you'll demonstrate your ability to:

    • Revise a C# console application that uses nested foreach loops to access array data based on an updated feature specification.

    • Update the variables and if statements in a C# console application to create the code branches and calculations required to satisfy an updated feature specification.

Syllabus

  • Install and configure Visual Studio Code
    • Introduction
    • Exercise - Download and install Visual Studio Code
    • Examine the Visual Studio Code user interface
    • Exercise - Explore the Visual Studio Code user interface
    • Exercise - Configure Visual Studio Code Extensions
    • Exercise - Install the .NET SDK
    • Exercise - Create, build, and run your application
    • Module assessment
    • Summary
  • Call methods from the .NET Class Library using C#
    • Introduction
    • Get started with .NET Libraries
    • Exercise - Call the methods of a .NET Class
    • Exercise - Return values and parameters of methods
    • Exercise - Complete a challenge activity to discover and implement a method call
    • Review the solution to discover and implement a method call challenge activity
    • Module assessment
    • Summary
  • Add decision logic to your code using `if`, `else`, and `else if` statements in C#
    • Introduction
    • Exercise - Create decision logic with if statements
    • Exercise - Create nested decision logic with if, else if, and else
    • Exercise - Complete a challenge activity to apply business rules
    • Review the solution to the apply business rules challenge activity
    • Module assessment
    • Summary
  • Store and iterate through sequences of data using Arrays and the foreach statement in C#
    • Introduction
    • Exercise - Get started with array basics
    • Exercise - Implement the foreach statement
    • Exercise - Complete a challenge activity for nested iteration and selection statements
    • Review the solution for the nested iteration and selection statements challenge activity
    • Module assessment
    • Summary
  • Create readable code with conventions, whitespace, and comments in C#
    • Introduction
    • Choose variable names that follow rules and conventions
    • Exercise - Create effective code comments
    • Exercise - Use whitespace to make your code easier to read
    • Exercise - Complete a challenge activity to improve code readability
    • Review the solution to the improve code readability challenge activity
    • Module assessment
    • Summary
  • Guided project - Develop foreach and if-elseif-else structures to process array data in C#
    • Introduction
    • Prepare
    • Exercise - Create arrays and foreach loops
    • Exercise - Construct a nested loop structure for student grade calculations
    • Exercise - Implement code branches using selection statements
    • Module assessment
    • Summary
  • Challenge project - Develop foreach and if-elseif-else structures to process array data in C#
    • Introduction
    • Prepare
    • Exercise - Update your formatted output
    • Exercise - Update your calculated values
    • Module assessment
    • Summary

Reviews

Start your review of Create and run simple C# console applications (Get started with C#, Part 2)

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.