Click here to Skip to main content
15,912,400 members
Home / Discussions / C#
   

C#

 
GeneralRe: Custom Control Design Time Problem Pin
Heath Stewart1-Jun-04 8:59
protectorHeath Stewart1-Jun-04 8:59 
GeneralRe: Custom Control Design Time Problem Pin
Z.D.Biles1-Jun-04 9:46
Z.D.Biles1-Jun-04 9:46 
Generalsystem language Pin
orcun colak1-Jun-04 7:45
orcun colak1-Jun-04 7:45 
GeneralRe: system language Pin
Heath Stewart1-Jun-04 8:55
protectorHeath Stewart1-Jun-04 8:55 
QuestionDataSet Pointer? Pin
Adam °Wimsatt1-Jun-04 7:27
Adam °Wimsatt1-Jun-04 7:27 
AnswerRe: DataSet Pointer? Pin
Heath Stewart1-Jun-04 8:51
protectorHeath Stewart1-Jun-04 8:51 
AnswerRe: DataSet Pointer? Pin
Anfernius1-Jun-04 8:51
Anfernius1-Jun-04 8:51 
AnswerRe: DataSet Pointer? Pin
LongRange.Shooter1-Jun-04 8:59
LongRange.Shooter1-Jun-04 8:59 
Any time you do an operation
a = b;


your are creating a pointer basicall making two references to a single object. An object is created in the heap, b has reference to that object, and a now has reference to that same object. It is more the rules of objects rather than a way it is done in C#.

To get a copy of the object depends on how the object is implemented. Now opening the Object Browser and searching for DataSet, when I select it I see that the Dataset object exposes ICloneable by the presence of the Clone() method.

So what you need to do is this:
a = b.Clone();

This will give you an independant clone of the object (without data as documented in the Object Browser) and allow you to change it to your hearts' content without impacting what you place in the datagrid.
Or you can do a = b.Copy() which will copy the structure and the data (as document in the Object Browser).

The object browser will give you quite alot of information on the various classes within the framework. You can run the Object Browser from the View menu option in Visual Studio. Use the binoculars icon to search for DataSet and then select the various methods to get a description of what they will do for you.

Enjoy.


______________________________
The Tao gave birth to machine language.
Machine language gave birth to the assembler.
The assembler gave birth to ten thousand languages.
Each language has its purpose, however humble.
Each language expresses the Yin and Yang of software.
Each language has its place within the Tao.
Beauty exists because we give a name to C#.
Bad exists because we give a name to COBOL.
GeneralXML Serializing a Color Pin
Joel Holdsworth1-Jun-04 7:26
Joel Holdsworth1-Jun-04 7:26 
GeneralRe: XML Serializing a Color Pin
leppie1-Jun-04 8:32
leppie1-Jun-04 8:32 
GeneralRe: XML Serializing a Color Pin
Joel Holdsworth1-Jun-04 10:38
Joel Holdsworth1-Jun-04 10:38 
GeneralFloating Toolbar Pin
maxbale1-Jun-04 7:21
maxbale1-Jun-04 7:21 
Generalupgrading to 2003 - problems with reports Pin
econnor1-Jun-04 6:19
econnor1-Jun-04 6:19 
GeneralRe: upgrading to 2003 - problems with reports Pin
LongRange.Shooter1-Jun-04 6:39
LongRange.Shooter1-Jun-04 6:39 
GeneralRe: upgrading to 2003 - problems with reports Pin
econnor1-Jun-04 8:09
econnor1-Jun-04 8:09 
GeneralSetting Up Update Pin
MrJJKoolJ1-Jun-04 6:13
MrJJKoolJ1-Jun-04 6:13 
GeneralRe: Setting Up Update Pin
flow55551-Jun-04 6:24
flow55551-Jun-04 6:24 
GeneralRe: Setting Up Update Pin
MrJJKoolJ1-Jun-04 8:16
MrJJKoolJ1-Jun-04 8:16 
GeneralRe: Setting Up Update Pin
flow55551-Jun-04 11:22
flow55551-Jun-04 11:22 
QuestionHow to hide a form if the user close it? Pin
Ariadne1-Jun-04 6:07
Ariadne1-Jun-04 6:07 
AnswerRe: How to hide a form if the user close it? Pin
LongRange.Shooter1-Jun-04 6:37
LongRange.Shooter1-Jun-04 6:37 
AnswerRe: How to hide a form if the user close it? Pin
Heath Stewart1-Jun-04 6:45
protectorHeath Stewart1-Jun-04 6:45 
GeneralShorten the String Pin
Adam °Wimsatt1-Jun-04 5:22
Adam °Wimsatt1-Jun-04 5:22 
GeneralRe: Shorten the String Pin
LongRange.Shooter1-Jun-04 8:13
LongRange.Shooter1-Jun-04 8:13 
QuestionHow do compile a dll and load it to the assembly in runtime? Pin
Louis Riel1-Jun-04 5:12
Louis Riel1-Jun-04 5:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.