//public static bool EqualsTypes(DbTypeBase a, DbTypeBase b) //{ // if (a.GetType() != b.GetType()) return false; // MemoryStream sa = new MemoryStream(), sb = new MemoryStream(); // XmlTool.SerializeObject(sa, a); // XmlTool.SerializeObject(sb, b); // byte[] ma = sa.ToArray(), mb = sb.ToArray(); // if (!ArrayTool.EqualsArrays(ma, mb)) return false; // return true; //} public virtual void SaveToXml(XmlElement xml) { xml.SetAttribute("datatype", Code.ToString().ToLower()); //if (ArraySpec.IsArray) xml.SetAttribute("array", ArraySpec.ToString()); XmlTool.SaveSpecificAttributes(SpecificData, "typespec.", xml); XmlTool.SaveProperties(this, xml); }