Array error in c# programming

Hello brothers and sisters,
I am a developer having at the start of my career. I am developing an application in dot net using C# that will work on the different aspects of the images. One of its functionality is to shows the pictures in the slide show. I am writing my own module for achieving that functionality.
I am facing a problem during execution of this module and I am unable to figure out what is causing this error to happen. The module contains the next and previous buttons that contains the code that moves the loaded images forward or backward one at a time.
Guide me in this regard.
The error says.
Failed to compare two elements in the array.
Error
Failed to compare two elements in the array.
Error Details
=== DETAILS===
Failed to compare two elements in the array.
=== CORRECTIVE ACTION===
No corrective action found
