Assuming you mean VB.NET
, array indices range from 0 to the array upper bound of 4 which you exceed at the last index. If you wish to sum the elements you could do
For Each n As Integer In intNum
tot = tot + n
Next
More Related Contents:
- How to loop through all the properties of a class?
- Case insensitive string compare in LINQ-to-SQL
- Does XSLT have a Split() function?
- “Items collection must be empty before using ItemsSource.”
- Yield in VB.NET
- Pick unique Random numbers
- How to count the number of rows in excel with data?
- Update primary key value using entity framework
- VB.Net – Excel COM Object not getting released [duplicate]
- What is the difference between Dim v As String() and Dim v() As String?
- Can I set Option Explicit and Option Strict on a Project/Solution level?
- Controlling Application’s Volume: By Process-ID
- Can I host a Windows Form inside a control
- Is it necessary to add a @ in front of an SqlParameter name?
- Accessing imgUr thru OAuth (uploading to user account)
- Making DataGridView rows a certain color based on a column value
- How do I validate email address formatting with the .NET Framework?
- Where are My.Settings saved in VB 2010 .NET?
- RestSharp serialization to JSON, object is not using SerializeAs attribute as expected
- Equivalent of MoveNext in VB.NET
- How should I cast in VB.NET?
- Shuffling an array of strings in vb.net
- Determine if a generic param is a Nullable type
- Get the name of Enum value
- How do I find out which control has focus in .NET Windows Forms?
- How do I fill an empty textbox with default text?
- variable/property changed event in vb.net
- vb.net Pass Textbox Between forms.
- String manipulation with & or + in VB.NET
- ‘Shadows’ vs. ‘Overrides’ in VB.NET