Here are some tips:
Turn on Rangechecking as you
access arrays.
Use the debugger and step through your code.
You also create memory leaks.
Using the debugger and stepping through your code is an essential technique and way better (and faster) than pasting your code here waiting for someone to do the job for you.