+ 1
I dont understand passing Argumente in C# can someone help me
3 ответов
+ 5
https://code.sololearn.com/c9S3QxU313hA/?ref=app
You can input
more than one argument,
of different types,
as long as you have declared the parameters when defining functions.
+ 4
https://code.sololearn.com/c9MBFk0nHr1W/?ref=app
When using function, (line 12, 13, 14),
argument is the values you pass into the function. (in example, is num, 20 and 30)
the type of variable you want to function to use, for example int, (line 11)
You have to declare the same type of variable when defining the function.(line 6, example is a)
this is called parameter
And you have to use the same name inside your function (line 7, example is a)
+ 4
https://code.sololearn.com/c2inJvrQQ1t3/?ref=app
You can perform logic inside your function, it helps to reduce the repeated lines.