private void setNotificaciones() { int x = 51, t = 26; if (SelectedItem != null) { notificaciones.Clear(); switch (SelectedItem.Tag.ToString()) { case "1": x = 25; break; case "2": t = 1; x = 25; break; } } var hoy = Fechas.GetFechaDateServer; int tipo = 1; for (int i = 1; i < x; i++) { if (i == t) { tipo = 2; } Notificaciones.Add(new cNotificacion { Id = i, Notificacion = string.Format("Notificacion de Prueba {0}", i), Fecha = hoy, Tipo = tipo }); } NoNotificaciones = string.Format("{0} Notificaciones", Notificaciones.Count); }