Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parameters and arrays
Message
De
05/08/2010 21:40:28
 
 
À
05/08/2010 20:55:10
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01475479
Message ID:
01475482
Vues:
45
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform