+ 1

I dont understand passing Argumente in C# can someone help me

25th Jan 2019, 11:10 AM
Niklas
Niklas - avatar
3 Réponses
+ 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.
25th Jan 2019, 11:29 AM
Gordon
Gordon - avatar
+ 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)
25th Jan 2019, 11:21 AM
Gordon
Gordon - avatar
+ 4
https://code.sololearn.com/c2inJvrQQ1t3/?ref=app You can perform logic inside your function, it helps to reduce the repeated lines.
25th Jan 2019, 11:34 AM
Gordon
Gordon - avatar