Hello,

I'm trying to make an editor for my game but how can I convert my old code from vb6.0 to vs 2010? I know it's all in System.IO but I can't figure out how it works

old code:
Code:
Public Sub SaveItems()

Dim ItemNum as long
Dim F as string
Dim Filename as string

F = FreeFile
Filename = App.Path & "\Data\Items\" & ItemNum & ".item"

'check if the items exists
CheckItems

For ItemNum = 1 To 50

Open Filename For Binary As #F
Put #F , , Item(ItemNum)
Close #F

Next

End Sub
new code ?

Code:
    Public Sub SaveItems()
        Dim filename As String
        Dim ItemNum as Integer

For ItemNum = 0 to 50

        filename = "Data\Items\" & ItemNum & ".item"

        If Not File.Exists(filename) Then
            File.Create(filename)
        End If

'here it should save the file? it should do something like this:
' -->
Open Filename For Binary As #F
Put #F , , Item(ItemNum)
Close #F
' <--

Next

End Sub
thanks in advaced