Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Catching error on creating a data set
Message
De
12/03/2012 14:12:51
 
 
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Versions des environnements
Environment:
C# 2.0
Divers
Thread ID:
01538013
Message ID:
01538093
Vues:
40
>>Actually, as Bonnie sort of pointed out, using 'ref' in this context is pointless since when passing the DataSet object you're passing a reference anyway. 'ref' is really only of use when passing value types (integers etc.)
>
>I see. Thank you. And as I already mentioned to John, I decided to do away with passing the data set at all and instead return it from the called method.


Viv says tht "ref" is really only of use when passing value types, and he's correct about that. However, I wanted to point out that "ref" is necessary with strings too (if you are going to be modifying the string in your method and expect to use it after the method call in the calling code, as would be the case for evaluating an ErrorMessage, for example).

~~Bonnie
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform