How can I get my vector ordered from lowest to highest, what happens is that I already have my method that I should do that, only that I have a logic problem, since it marks me error when making my if
public void ordeanar()
{
for (int x = 0; x < vector.Length; x++)
{
for (int k = 0; k < vector.Length - x;k++ )
{
if (vector[k] < vector[k + 1]) --> ERROR
{
int aux;
aux = vector[k];
vector[k] = vector[k + 1];
vector[k + 1] = aux;
}
}
}
}