1/13
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
method
A ____ is a block of code which only runs when it is called
arguments
You can pass data, known as ____, into a method
functions
Methods are used to perform certain actions, and they are also known as _____
reuse code
Why use methods? To _____: define the code once, and use it many times
parentheses ()
A method is defined with the name of the method, followed by _____
pre-defined methods
C# provides some _____, which you already are familiar with, such as Main(), but you can also create your own methods to perform certain actions
Declared methods, called
_____ are not executed immediately. They are "saved for later use", and will be executed later, when they are ____
name, two parentheses (), semicolon ;
To call a method, write the method’s ___ followed by _____ and a _____
parameter
A _____ is the variable defined within the parentheses during method definition. Simply they are written when we declare a method
argument
An _____is a value that is passed to a method when it is called. It might be a variable or value to a method as input. They are written when we are calling the method
equals sign (=)
You can also use a default parameter value, by using the _____
void
The ___ keyword indicates that the method should not return a value
primitive, int, double, return
If you want the method to return a value, you can use a ____ data type (such as ___ or ____) instead of void, and use the ___ keyword inside the method
method overloading
With ______, multiple methods can have the same name with different data types of parameters