Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parameters and arrays
Message
From
05/08/2010 21:40:28
 
 
To
05/08/2010 20:55:10
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01475479
Message ID:
01475482
Views:
44
Methods should be self documenting and the API should be clearly defined. If you pass everything as an array, you lose all that. Additionally, the method should do one thing, and one thing only. Sometimes it should return a value that is the result of what the method does. Other times it should return true or false. Sometimes it's void.

>There is an actual thread in this forum which deals with the concept of using parameters and arrays. Years ago, when using Visual FoxPro, this topic was brought and many recommended to use an array as a parameter instead of passing multiple parameters. Even with a totally OOP environment, sometimes there could be a need to pass multiple parameters. As for me, since the last year, I practically changed everything in regards that to avoid passing any parameter. Basically, all methods return True or Fase, for the success of the method, and all required parameters are then replaced by class properties. I would like to collect feedback on this topic as well as related issues.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform