Create C# methods that return values

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

Learn to create methods that return values

Learning objectives

  • Understand return types

  • Learn more about the return keyword

  • Learn more about capturing method return values

Prerequisites

  • Experience using C# data types including int, string, arrays, and 2D arrays

  • Experience using switch statements, if-else statements, and for-loops

  • Experience using the Random class to generate a random number.

  • Basic understanding of C# methods