0

I dont understand parameter concept

?

12th May 2019, 11:27 AM
DEEPANSHU SHARMA
DEEPANSHU SHARMA - avatar
4 Answers
+ 5
The simplest answer would be that parameters are some variables (or values) that you pass to the methods so that methods can change them or do some calculation (or logic) on them. Take a look for more details : https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/passing-parameters
12th May 2019, 12:19 PM
dρlÏ…Ń•ÏlÏ…Ń•
dρlÏ…Ń•ÏlÏ…Ń• - avatar
+ 3
You can write code with everything in 1 big main function. It could be working but is hard to maintain. So to get organised, you can divide code in to blocks. One method, one goal Some people like bigger blocks other keep methods as small as possible and have a lot of them. What every you do in a method There is some input (this is optional) a conversion / calclation / or something else you need to do. And a output (this one is also optional). static public void PrintWarning(string warning) static public void Add(int a, int b) https://code.sololearn.com/cjHmey4l8Ba0 What you choose as input parameters is personal prefference, it is your style and logic. This seams a bit daunting at the beginning, but after a while you will create a rountine of identifing inputs and outputs.
12th May 2019, 7:58 PM
sneeze
sneeze - avatar
+ 1
Please explain yourself a bit more. Do you understand method concept ? What is it you find difficult about parameters
12th May 2019, 11:49 AM
sneeze
sneeze - avatar
0
sneeze I understand methods . Like when I create method what parameters I have to given
12th May 2019, 3:31 PM
DEEPANSHU SHARMA
DEEPANSHU SHARMA - avatar