Increase of a PIN in the for loop

Hi

For i As Integer = 0 To 6
           Outs(i) = New GTI.DigitalOutput(Socket, Gadgeteer.Socket.Pin.Three + i, False, Modules)
           Next

the sum. Pin.Three + i
work in C # but not in VB
how you can use a similar function in VB?

@ ABS_DEV - Can you cast the enum to an int like this:


Outs(i) = New GTI.DigitalOutput(Socket, (int)Gadgeteer.Socket.Pin.Three + i, False, Modules)

so by an error of type
but in VB Integer Gadgeteer.Socket.Pin.Three be allowed to become?

I confirm that the sum without the program
works perfectly! :slight_smile:

 Outs(0) = New GTI.DigitalOutput(Socket, Socket.Pin.Three, False, Modules)