public static bool SerializarXML2(this ISerializar xml, string ruta) { /* try * { * * StreamWriter tw = new StreamWriter(ruta); * XmlSerializer serializer = new XmlSerializer(typeof(Cartuchera<Utiles>)); * serializer.Serialize(tw, xml); * tw.Close(); * return true; * * } * catch (Exception e) * { * * // tw.Close(); * return false; * * }*/ return(xml.SerializarXml(ruta)); }