Click here to Skip to main content
15,899,825 members
Home / Discussions / C#
   

C#

 
GeneralRe: File Ops: Windows Service vs. EXE Pin
Dave Kreskowiak11-Jul-05 1:46
mveDave Kreskowiak11-Jul-05 1:46 
Generaltextboxes Pin
mihai_152910-Jul-05 13:13
mihai_152910-Jul-05 13:13 
GeneralRe: textboxes Pin
Christian Graus10-Jul-05 13:37
protectorChristian Graus10-Jul-05 13:37 
GeneralRe: textboxes Pin
mihai_152910-Jul-05 23:40
mihai_152910-Jul-05 23:40 
GeneralRe: textboxes Pin
Christian Graus11-Jul-05 13:05
protectorChristian Graus11-Jul-05 13:05 
GeneralA question about ListBoxes... Pin
Lord Kixdemp10-Jul-05 10:57
Lord Kixdemp10-Jul-05 10:57 
Generalshallow/deep copy-- I give up...... Pin
...---...10-Jul-05 6:42
...---...10-Jul-05 6:42 
GeneralRe: shallow/deep copy-- I give up...... Pin
S. Senthil Kumar10-Jul-05 6:50
S. Senthil Kumar10-Jul-05 6:50 
It's pretty simple actually. A shallow copy is when you copy just the references to an object, a deep copy copies the objects themselves. For example
class Foo
{
}

class Bar
{
  Foo f;

  public Bar ShallowCopy()
  {
    Bar b = new Bar();
    b.f = this.f;
    return b;
  }

  public Bar DeepCopy()
  {
    Bar b = new Bar();
    b.f = f.DeepCopy();
    return b;
  }
}

The Bar object returned by ShallowCopy and the original Bar object both have the same reference to the Foo object. DeepCopy, as you can see, copies the Foo object itself. Note that if Foo has references to some other objects, then it needs to DeepCopy those also and so on. Basically, DeepCopy recursively copies the entire object graph.

Hope this helps.

Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
GeneralRe: shallow/deep copy-- I give up...... Pin
leppie11-Jul-05 0:54
leppie11-Jul-05 0:54 
GeneralRe: shallow/deep copy-- I give up...... Pin
S. Senthil Kumar11-Jul-05 1:25
S. Senthil Kumar11-Jul-05 1:25 
GeneralWindows services.. Please Help me urgently Pin
Zeeshan Gulzar10-Jul-05 6:35
Zeeshan Gulzar10-Jul-05 6:35 
GeneralListView column resize broken column Pin
ARBR10-Jul-05 4:53
ARBR10-Jul-05 4:53 
GeneralC# XML Pin
Newbie_Toy10-Jul-05 4:10
Newbie_Toy10-Jul-05 4:10 
GeneralRe: C# XML Pin
DavidNohejl10-Jul-05 4:25
DavidNohejl10-Jul-05 4:25 
QuestionHow can we let a windows service sending a message ? Pin
Blue_Skye10-Jul-05 0:44
Blue_Skye10-Jul-05 0:44 
AnswerRe: How can we let a windows service sending a message ? Pin
S. Senthil Kumar10-Jul-05 3:23
S. Senthil Kumar10-Jul-05 3:23 
GeneralRe: How can we let a windows service sending a message ? Pin
Blue_Skye10-Jul-05 6:30
Blue_Skye10-Jul-05 6:30 
GeneralOpen File Dialog Pin
Expert Coming9-Jul-05 23:44
Expert Coming9-Jul-05 23:44 
GeneralRe: Open File Dialog Pin
Tomas Petricek10-Jul-05 0:00
Tomas Petricek10-Jul-05 0:00 
GeneralRe: Open File Dialog Pin
Dave Kreskowiak10-Jul-05 8:38
mveDave Kreskowiak10-Jul-05 8:38 
GeneralGIF Images Pin
Expert Coming9-Jul-05 23:22
Expert Coming9-Jul-05 23:22 
GeneralRe: GIF Images Pin
Expert Coming9-Jul-05 23:42
Expert Coming9-Jul-05 23:42 
GeneralCOM in C# Pin
pakFari9-Jul-05 19:19
pakFari9-Jul-05 19:19 
GeneralRe: COM in C# Pin
Denevers10-Jul-05 2:34
Denevers10-Jul-05 2:34 
GeneralRe: COM in C# Pin
pakFari10-Jul-05 7:33
pakFari10-Jul-05 7:33 

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.