示例#1
0
 private void MostrarInformacion <T>(IMostrar <T> elemento)
 {
     if (elemento != null && elemento is Paquete)
     {
         this.rtbMostrar.Text = ((Paquete)elemento).MostrarDatos((Paquete)Convert.ChangeType(elemento, typeof(Paquete)));
         GuardaString.GaurdarString(rtbMostrar.Text, Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + @"\salida.txt");
     }
     if (elemento != null && elemento is Correo)
     {
         this.rtbMostrar.Text = ((Correo)elemento).MostrarDatos((Correo)Convert.ChangeType(elemento, typeof(Correo)));
         GuardaString.GaurdarString(rtbMostrar.Text, Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + @"\salida.txt");
     }
 }