
10/11/2009, 15:06
|
 | Colaborador | | Fecha de Ingreso: septiembre-2007 Ubicación: San Francisco, United States
Mensajes: 3.858
Antigüedad: 17 años, 5 meses Puntos: 87 | |
Respuesta: Si pertenece al rango (ayuda en C#) if( numero <=5 && numero >=1)
{
}
else
{
}
o
int limiteInferior=1;
int limitesuperior=5;
if( numero <=limitesuperior && numero >=limiteinferior)
{}
else
{}
o usando Linq Enumerables
Enumerable.Range(limiteinferior,limitesuperior).To Array()
y usar Array.IndexOf(numero)
pero una keyword rango o similar estoy 99% seguro que no la hay |