Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing dataset by reference
Message
 
 
À
12/03/2012 11:08:01
John Baird
Coatesville, Pennsylvanie, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Versions des environnements
Environment:
C# 2.0
Divers
Thread ID:
01538045
Message ID:
01538057
Vues:
32
>>>>When you are saying "if you initialize it to Nothing" do you mean that right after the line
>>>>
>>>>DataSet ds = new DataSet();
>>>>
>>>>I should set it to null?
>>>>E.g.
>>>>
>>>>DataSet ds = new DataSet();
>>>>ds = null;
>>>>
>>>
>>>I was referencing to the declaration line. Thus, in the sample you provided, it would be the first line.
>>
>>Thank you.
>
>
>you don't need the double definition:
>
>
>     DataSet ds = new DataSet();
>     ds = null;
>
>
>simpler:
>
>
>     DataSet ds = null;
>
The code (as you suggested above) does work but only if I use the Out clause when passing it. Does it mean that the only way to make it work is by using Out?
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform