Two maximal value in array. Sorted and Array.Sort()
for (int j = i + 1; j &lt; arrOne.Length; j++) if (arrOne[minIndex] &gt; arrOne[j]) minIndex = j;



This is by far the worst line in your code. It took me a while to realize that there is actually an if behind the for while I was wondering why didn't you indent the three lines below it but wait, these lines are not part of the for, it's the if. You should always use curly brackets

for (int j = i + 1; j &lt; arrOne.Length; j++) 
{ 
    if (arrOne[minIndex] &gt; arrOne[j]) 
    {
        minIndex = j;
    }
}


This is how it should look like.