John Baird
Coatesville, Pennsylvanie, États-Unis
Information générale
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Network:
Windows 2008 Server
>>Hi All,
>>
>>I need to return 2 values from a VB.NET function. One is data type integer and the other string.
>>What is the best approach to acomplish that?
>>
>>Thanks,
>>Daniel
>
>
>You may wish to look at your design. A function should perform a single job and return a single value, if you have the need to do more, then I think inherently something is wrong.
Do I spot a 'VFP' mindset here :-}.
C (and large junks of the windows API) regularly make use of out and ref parameters - even when a structure is used it is often returned as an out parameter. In these cases the main parameter is usually simply a success/fail indicator.
What do you think is wrong with this approach?
Regards,
Viv
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement