Jim
VS.NET 2003 syntax
Dim a() As Integer = {1, 2, 3, 4, 5}
Dim sum As Integer
For Each item As Integer in a
sum += item
Next
Of course you change Integer to any data type you want.
If you do not care for For Each, you can use any other type of loop you
want.
Hope this helps
Jay
"Jim" <Ji*@Jones6148.freeserve.co.uk> wrote in message
news:u1**************@TK2MSFTNGP10.phx.gbl...
What is the syntax for summing the elements of the an array and putting
that value into another varialble? Please.