Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing dataset by reference
Message
 
 
To
12/03/2012 11:08:01
John Baird
Coatesville, Pennsylvania, United States
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
C# 2.0
Miscellaneous
Thread ID:
01538045
Message ID:
01538057
Views:
33
>>>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform