Menu
×
×
Correct!

Exercise:

Insert the missing part to print the number 8 in Main, by using a specific keyword inside MyMethod:

static int MyMethod(int x) { return 5 + x; } static void Main(string[] args) { Console.WriteLine(MyMethod(3)); }

Not Correct

Click here to try again.

Correct!

Next ❯
static int MyMethod(int x) 
{
   5 + x;
}

static void Main(string[] args)
{
  Console.WriteLine(MyMethod(3));
}

  
  
  




Completed 0 of 58 Exercises:

C# Syntax
C# Comments
C# Variables
C# Data Types
C# User Input
C# Operators
C# Math
C# Strings
C# Booleans
C# If...Else
C# Switch
C# Loops
C# Arrays
C# Methods
C# Classes/Objects
C# Exceptions

×

Reset the Score?

This will reset the score of ALL 58 exercises.

Are you sure you want to continue?



×

Congratulations!

You have finished all 58 C# exercises.

Share your score: