Short Question On Methods [Parameters and Calls]
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Short Question On Methods [Parameters and Calls]

  1. #1
    Join Date
    Jun 2014
    Posts
    17

    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.

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    11,310

    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
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center