Posts

Showing posts from January, 2013

Games Of Reflections

i got this task from an interview, got all this code and was asked to implement the Serialize class. there r a few points: 1 - circular reference (of person) 2 - after Deserialize the mutual Address object must be the same again, as in only 1 instance. so here is what i did: using System; using System.Collections.Generic; using  System.Diagnostics; using  System.IO; using  System.Linq; using  System.Reflection; using  System.Runtime.Serialization; using  System.Xml.Serialization; using  System.Data; namespace  SerializeExercise {   class FullName    {             public bool Equals( FullName other)     {       return string .Equals(_firstName, other._firstName)              &&  string .Equals(_lastName, other._lastName);     }                 public override bool Equals( object obj)     {                   if (ReferenceEquals( null , obj)) return false ;       return obj is FullName &&