Re: [ADVANCED-DOTNET] Copy constructor vs. ICloneable

2002-08-14 Thread Mitch Denny
- +61 (414) 610-141 - -Original Message- From: Moderated discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED]] On Behalf Of Jesse Liberty Sent: Wednesday, 14 August 2002 9:02 PM To: [EMAIL PROTECTED] Subject: [ADVANCED-DOTNET] Copy constructor vs. ICloneable Is there a good design

Re: [ADVANCED-DOTNET] Copy constructor vs. ICloneable

2002-08-14 Thread Kirk Allen Evans
--Original Message- > From: Moderated discussion of advanced .NET topics. > [mailto:[EMAIL PROTECTED]]On Behalf Of Bailey, Mark > Sent: Wednesday, August 14, 2002 10:31 AM > To: [EMAIL PROTECTED] > Subject: Re: [ADVANCED-DOTNET] Copy constructor vs. ICloneable > > > hey, speaki

Re: [ADVANCED-DOTNET] Copy constructor vs. ICloneable

2002-08-14 Thread Ian Griffiths
What's more, even if you do find what looks like a copy constructor, you've not actually got any guarantees that it really is a copy constructor. For example: public class TreeNode { public TreeNode(TreeNode parent) { ... } ... } If you were using reflection to look for copy constructors, t

Re: [ADVANCED-DOTNET] Copy constructor vs. ICloneable

2002-08-14 Thread Mickey Williams
l C# .NET", MS Press - Original Message - From: "Graeme Foster" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, August 14, 2002 6:36 AM Subject: Re: [ADVANCED-DOTNET] Copy constructor vs. ICloneable > I don't know what you'd call a good reason,

Re: [ADVANCED-DOTNET] Copy constructor vs. ICloneable

2002-08-14 Thread Bailey, Mark
: Graeme Foster [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 14, 2002 9:36 AM To: [EMAIL PROTECTED] Subject: Re: [ADVANCED-DOTNET] Copy constructor vs. ICloneable I don't know what you'd call a good reason, but here's one that's good enough for me - it's easier to cal

Re: [ADVANCED-DOTNET] Copy constructor vs. ICloneable

2002-08-14 Thread Jim Murphy
om: Moderated discussion of advanced .NET topics. [mailto:ADVANCED- > [EMAIL PROTECTED]] On Behalf Of Jesse Liberty > Sent: Wednesday, August 14, 2002 6:02 AM > To: [EMAIL PROTECTED] > Subject: [ADVANCED-DOTNET] Copy constructor vs. ICloneable > > Is there a good design reason to favo

Re: [ADVANCED-DOTNET] Copy constructor vs. ICloneable

2002-08-14 Thread Graeme Foster
I don't know what you'd call a good reason, but here's one that's good enough for me - it's easier to call IClonable.Clone() than it is to call a constructor for an unknown type. Compare: object clone = ((IClonable) anyObj).Clone(); To: 1. Get type of anyObj 2. Find copy constructor for that

[ADVANCED-DOTNET] Copy constructor vs. ICloneable

2002-08-14 Thread Jesse Liberty
Is there a good design reason to favor implementing ICloneable rather than implementing a copy constructor? -j --- Jesse Liberty, President Liberty Associates, Inc. .NET Programming and Training http://www.LibertyAssociates.com You can read messages from the Advance