المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Adding all the items in a listbox



C# Programming
11-09-2009, 02:02 AM
I have a listBox that contains a collection of prices. I converted them to double and tried to add them up. The problem is I can't add them. I tried to copy all the items into a temporary Array and add them but when i run the application, there's no item being copied to the temp array. They were added right after the user has selected the item that has that price and entered the quantity of that item. The prices are already multiplied to the quantity the user has entered. So how can I add all the prices. I tried to pass the collection of prices to another form using delegates but I failed. Can anyone help me?