Click here to Skip to main content
15,898,134 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to implement Apriori using C# am new to C# Pin
Garth J Lancaster24-Sep-15 21:35
professionalGarth J Lancaster24-Sep-15 21:35 
Questiondebugging strategy ? Linq query mis-match using de-serialized complex class Pin
BillWoodruff24-Sep-15 12:53
professionalBillWoodruff24-Sep-15 12:53 
AnswerRe: debugging strategy ? Linq query mis-match using de-serialized complex class Pin
Gerry Schmitz24-Sep-15 18:30
mveGerry Schmitz24-Sep-15 18:30 
GeneralRe: debugging strategy ? Linq query mis-match using de-serialized complex class Pin
BillWoodruff24-Sep-15 22:20
professionalBillWoodruff24-Sep-15 22:20 
GeneralRe: debugging strategy ? Linq query mis-match using de-serialized complex class Pin
Gerry Schmitz25-Sep-15 8:28
mveGerry Schmitz25-Sep-15 8:28 
GeneralRe: debugging strategy ? Linq query mis-match using de-serialized complex class Pin
Kenneth Haugland25-Sep-15 19:36
mvaKenneth Haugland25-Sep-15 19:36 
GeneralRe: debugging strategy ? Linq query mis-match using de-serialized complex class Pin
BillWoodruff26-Sep-15 1:11
professionalBillWoodruff26-Sep-15 1:11 
GeneralRe: debugging strategy ? Linq query mis-match using de-serialized complex class Pin
Gerry Schmitz28-Sep-15 6:15
mveGerry Schmitz28-Sep-15 6:15 
I tend to use shallow copies in my CRUD operations when I'm not interested in creating an entire graph of objects and just need access to one object's instance values: e.g. for change tracking / undoing changes; creating and initializing binding sources; etc.

A reference to an existing object used for another purpose would not work in this case.

I suspect MemberwiseClone() is only intended to be a primitive for shallow copies because there are a number of ways to do deep copies, including reflection and serialization / deserialization:
C#
static object Clone( object parent ) {

   XmlSerializer serializer = new XmlSerializer( parent.GetType() );
   object clone = null;

   using ( MemoryStream stream = new MemoryStream() ) {
      serializer.Serialize( stream, parent );
      stream.Position = 0;
      clone = serializer.Deserialize( stream );
   }  //  end using.

   return clone;
}

GeneralRe: debugging strategy ? Linq query mis-match using de-serialized complex class Pin
Kenneth Haugland28-Sep-15 9:18
mvaKenneth Haugland28-Sep-15 9:18 
Questionrun time validation for text box Pin
Member 1198293424-Sep-15 4:38
Member 1198293424-Sep-15 4:38 
AnswerRe: run time validation for text box Pin
Ravi Bhavnani24-Sep-15 4:45
professionalRavi Bhavnani24-Sep-15 4:45 
GeneralRe: run time validation for text box Pin
Member 1198293424-Sep-15 7:04
Member 1198293424-Sep-15 7:04 
AnswerRe: run time validation for text box Pin
OriginalGriff24-Sep-15 5:30
mveOriginalGriff24-Sep-15 5:30 
AnswerRe: run time validation for text box Pin
Gerry Schmitz24-Sep-15 9:01
mveGerry Schmitz24-Sep-15 9:01 
QuestionC# UserControl Inheritance Pin
didydj24-Sep-15 1:40
didydj24-Sep-15 1:40 
AnswerRe: C# UserControl Inheritance Pin
OriginalGriff24-Sep-15 2:19
mveOriginalGriff24-Sep-15 2:19 
AnswerRe: C# UserControl Inheritance Pin
BillWoodruff24-Sep-15 7:13
professionalBillWoodruff24-Sep-15 7:13 
AnswerRe: C# UserControl Inheritance Pin
Gerry Schmitz24-Sep-15 8:56
mveGerry Schmitz24-Sep-15 8:56 
GeneralRe: C# UserControl Inheritance Pin
BillWoodruff24-Sep-15 12:18
professionalBillWoodruff24-Sep-15 12:18 
AnswerRe: C# UserControl Inheritance Pin
didydj28-Sep-15 4:07
didydj28-Sep-15 4:07 
Question(Selenium web driver using c#)How to make the webdrivers.exe path to environment varibales in my local machine Pin
Member 1200855524-Sep-15 0:47
Member 1200855524-Sep-15 0:47 
AnswerRe: (Selenium web driver using c#)How to make the webdrivers.exe path to environment varibales in my local machine Pin
Pete O'Hanlon24-Sep-15 0:54
mvePete O'Hanlon24-Sep-15 0:54 
QuestionNewbie: code doesn't return result, could someone please help? Pin
Member 1200834023-Sep-15 23:41
Member 1200834023-Sep-15 23:41 
AnswerRe: Newbie: code doesn't return result, could someone please help? Pin
OriginalGriff24-Sep-15 0:14
mveOriginalGriff24-Sep-15 0:14 
QuestionRe: Newbie: code doesn't return result, could someone please help? Pin
Richard MacCutchan24-Sep-15 1:13
mveRichard MacCutchan24-Sep-15 1:13 

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.