milop
Mon Mar 17 15:21:15 CDT 2008
> Hi, Peter.
>
> As I just explained to Peter Duniho, FunctionA was able to bind a control
> to the dataset returned from FunctionB, even though FunctionB used
> "Using".
>
> I have a feeling the GC didn't collect the Dataset object until after
> FunctionA used it (?)
>
> What do you think?
>
> Thanks,
>
> Mike
>
> "Peter Ritchie [C# MVP]" <PRSoCo@newsgroups.nospam> wrote in message
> news:C0405002-0FE9-46E7-A968-6969DD586911@microsoft.com...
>> Using will cause the DataSet to be disposed before being returned from
>> the
>> method.
>>
>> I would recommend not using Using.
>>
>> --
>> Browse
http://connect.microsoft.com/VisualStudio/feedback/ and vote.
>>
http://www.peterRitchie.com/blog/
>> Microsoft MVP, Visual Developer - Visual C#
>>
>>
>> "milop" wrote:
>>
>>> Hi, Pete. Thanks for responding.
>>>
>>> My question then is what will "Using" do with the dataset inside of
>>> FuntionB?
>>>
>>> "Peter Duniho" <NpOeStPeAdM@nnowslpianmk.com> wrote in message
>>> news:op.t7584vbt8jd0ej@petes-computer.local...
>>> > On Mon, 17 Mar 2008 10:28:59 -0700, milop <milop@slomins.com> wrote:
>>> >
>>> >> I'm uncertain about what Function A (below) receives from Function B,
>>> >> a
>>> >> copy
>>> >> of the dataset or the actual dataset object:
>>> >
>>> > The original object (IMHO "actual" is misleading, since if it _were_
>>> > being
>>> > copied, you'd have two "actual" objects...both would be legitimate
>>> > DataSet
>>> > instances in their own right).
>>> >
>>> > Pete
>>>
>>>
>>>