Information générale
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Network:
Windows 2008 Server
>Not sure I agree with that statement but will accept it. However it does not mean, or imply, that there are no valid uses of either 'out' or 'ref' in other contexts.
>
>As a general statement, I'd agree with Craig. It's better to return a structure/collection/object, than to use multiple instances of scalar out/ref items. I don't necessary agree that the use of out/ref requires knowledge of pointers (though it wouldn't hurt)....but I would only use an out/ref if I had no other choice.
>
>And I agree, there are inconsistencies in the development tools.
I'd agree that 'out' would be cumbersome with more than one (or possibly two) parameters. But how would you write a better version of TryParse() ?
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