-
July 21st, 2014, 09:23 PM
#1
Short Question On Methods [Parameters and Calls]
Hey guys! Ive been studying and watching videos the past few days on creating new methods and using them. My question is how would i know when to use parameters , return types, and call them to any method. To me its really hard to get the concept of making params for user input, arrays and loops.
Last edited by Dylan3dx; July 21st, 2014 at 11:00 PM.
-
July 22nd, 2014, 01:32 AM
#2
Re: Short Question On Methods [Parameters and Calls]
It gets easier. You always should try to pass the minimum amount of parameters to a method. Often times for class methods you don't need to pass any parameters (because the method is acting on the class field or property data).
If you pass parameters to the method, then only pass what you need and isn't already available from the class.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|