VB.NET Incrementing Indexes

Posted by Daniel on Stack Overflow See other posts from Stack Overflow or by Daniel
Published on 2010-05-08T21:21:49Z Indexed on 2010/05/08 21:28 UTC
Read the original article Hit count: 143

Filed under:
|
|

Hello,

I am having trouble incrementing the indexes of my list item properties. Here is the code.

        Dim i As Integer = 0

        For x As Integer = 1 To list.Count / 19
            database.ExecuteCommand("INSERT INTO Contacts VALUES ('" + _
                                    list.Item(i) + "', '" + _
                                    list.Item(++i) + "', '" + _
                                    list.Item(++i) + "', '" + _
                                    list.Item(++i) + "', '" + _
                                    list.Item(++i) + "', '" + _
                                    list.Item(++i) + "', '" + _
                                    list.Item(++i) + "', '" + _
                                    list.Item(++i) + "', '" + _
                                    list.Item(++i) + "', '" + _
                                    list.Item(++i) + "', '" + _
                                    list.Item(++i) + "', '" + _
                                    list.Item(++i) + "', '" + _
                                    list.Item(++i) + "', '" + _
                                    list.Item(++i) + "', '" + _
                                    list.Item(++i) + "', '" + _
                                    list.Item(++i) + "', '" + _
                                    list.Item(++i) + "', '" + _
                                    list.Item(++i) + "', '" + _
                                    list.Item(++i) + "')")
        Next

The ++i does not increment at all in the parameters.

Thanks

© Stack Overflow or respective owner

Related posts about vb.net

Related posts about increment