public static void Serializar(string Ruta, Datos_Zapatas datos) { BinaryFormatter formatter = new BinaryFormatter(); Stream stream = new FileStream(Ruta, FileMode.Create, FileAccess.Write, FileShare.None); formatter.Serialize(stream, datos); stream.Close(); }
public static Datos_Zapatas Get_DatosZapatas() { var recursos = App.Current.Resources; int cont = 0; Datos_Zapatas variables = null; foreach (DictionaryEntry i in recursos) { if (i.Key.ToString() == "DatosZapatas") { variables = i.Value as Datos_Zapatas; return(variables); } cont++; } return(variables); }