Module 5: C# User-defined Methods

0.0(0)
studied byStudied by 0 people
full-widthCall with Kai
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/13

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

14 Terms

1
New cards

method

A ____ is a block of code which only runs when it is called

2
New cards

arguments

You can pass data, known as ____, into a method

3
New cards

functions

Methods are used to perform certain actions, and they are also known as _____

4
New cards

reuse code

Why use methods? To _____: define the code once, and use it many times

5
New cards

parentheses ()

A method is defined with the name of the method, followed by _____

6
New cards

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

7
New cards

Declared methods, called

_____ are not executed immediately. They are "saved for later use", and will be executed later, when they are ____

8
New cards

name, two parentheses (), semicolon ;

To call a method, write the method’s ___ followed by _____ and a _____

9
New cards

parameter

A _____ is the variable defined within the parentheses during method definition. Simply they are written when we declare a method

10
New cards

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

11
New cards

equals sign (=)

You can also use a default parameter value, by using the _____

12
New cards

void

The ___ keyword indicates that the method should not return a value

13
New cards

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

14
New cards

method overloading

With ______, multiple methods can have the same name with different data types of parameters