Very basic difference !

When you assign a reference type to another variable the object itself
is not copied, rather the reference to the object is copied.
Therefore, modifying one variable will reflect the change in the other
variable.

When you use the Copy() method of the DataSet object, it makes a
separate copy of the DataSet completely distinct from the original
copy. Modifying one will not affect the other.

Research the following topics :
1. Shallow copy v/s Deep Copy.
2. Heap v/s Stack
3. Reference types v/s Value types.

On Nov 12, 12:41 pm, Benj Nunez <[EMAIL PROTECTED]> wrote:
> Hello experts,
>
> I went to this 
> site:http://www.dotnetspider.com/forum/ViewForum.aspx?ForumId=57518
> and it mentioned the use of the Copy() method from the dataset.
>
> I'm just wondering if there's a difference between using Copy() over
> the normal assignment?
>
> For example instead of
>
> DataSet Ds = Ds2.Copy();
>
> why not this (which is by far, much shorter) :
>
> DataSet Ds = Ds2;
>
> Thank you in advance!
>
> Cheers,
>
> Benj

Reply via email to