prova così
codice:
for (int i=0; i<MaxArray; i++){ 
if (number[i] <= number[indexOfMin])&&(number[i]!=null)) { 
indexOfMin = i; 
nMin = number[indexOfMin];