Finding largest or smallest element is easy as compare to finding the second largest element in an unsorted array. This problem can be solved using Sorting. Instead of sorting we will use a different approach for solving this problem.

        public static int FindSecondNdLarge(int[] array)
        {
            int size = array.Length;
            int[] max = new int[] { 0, 0 };
            int counter;

            if (array[0] > array[1])
            {
                max[0] = array[0];
                max[1] = array[0];
            }
            else
            {
                max[0] = array[1];
                max[1] = array[0];
            }

            for (counter = 2; counter < size; counter++)
            {
                if (array[counter] > max[1])
                {
                    if (array[counter] > max[0])
                    {
                        max[1] = max[0];
                        max[0] = array[counter];
                    }
                    else
                    {
                        max[1] = array[counter];
                    }
                }
            }

            return max[1];
        }