Create methods in C# console applications (Get started with C#, Part 5)

Beginner
Developer
Higher Education Educator
K-12 Educator
Student
.NET
Visual Studio Code

Learn how to create methods for C# console applications. Use parameters and return values to manipulate data across applications. Learn to use named and optional arguments to simplify code.

Prerequisites

  • Experience with basic coding tasks such as instantiating variables, using various data types, and sending output to a console window.
  • Experience using Visual Studio Code to create and run simple console applications.
  • Experience using C# data types including int, string, double, and arrays
  • Experience using switch statements, if-else statements, and for loops
  • Experience using string.Split

Modules in this learning path

Learn to create your own methods to perform specific tasks.

Learn how to use different types of input parameters in methods

Learn to create methods that return values

Demonstrate your ability to develop a console app that relies on methods with different parameters and return values to coordinate a visit to the petting zoo.

Demonstrate your ability to create and use different methods to develop features for a console mini-game.