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
keywordLearn more about capturing method return values
Prerequisites
Experience using C# data types including
int
,string
, arrays, and 2D arraysExperience using
switch
statements, if-else statements, and for-loopsExperience using the
Random
class to generate a random number.Basic understanding of C# methods