Thanks for your reply...but i have managed to come up with a solution. Instead of using list.addrange(array) i have simply replaced it with a for loop and used list.add(array(i)).
Thank you for your help though