<summary>///reference objects comparison///</summary>// <param name= "Obja" ></param> // <param name= "OBJB" ></param>/// <returns></returns> public static bool Compareobject (Object Obja, Object objb) { BOOL flag = FALSE; if (Obja = = DBNull.Value | | objb = = DBNull.Value | | obja = NULL | | objb = = NULL) { flag = false; } else if (obja.gettype () = Objb.gettype ()) { flag = false; } else { string stra = Entityclassxmlserializer<object>. Toxmlstring (obja); string StrB = Entityclassxmlserializer<object>. Toxmlstring (OBJB); if (stra = = StrB) { flag = true; } } return flag; }
Deep Copy Part code:
C # entity class serialization and deserialization one (XmlSerializer)
C # entity class serialization and deserialization two (DatacontractserializeR)
Copyright: jiankunking Source: http://blog.csdn.net/jiankunking This article is copyright to the author and Csdn, Welcome to reprint, but without the consent of the author must retain this paragraph, and in the article page obvious location to the original connection.
C # Object Comparisons (value types, reference types)