Converting Quick BASIC to VB.Net - Random Access Files

[亡魂溺海] 提交于 2019-12-06 02:10:57

The Microsoft.VisualBasic.FileOpen, FilePut, and FileGet statements should be pretty direct replacements for most of your code above.

    Microsoft.VisualBasic.FileOpen(1, "test.dat", OpenMode.Random, OpenAccess.ReadWrite, OpenShare.Shared)

    Dim output As New Fields

    output.A = "One"
    output.B = "Two"

    Microsoft.VisualBasic.FilePut(1, output, 1)

    Dim input As New Fields

    Microsoft.VisualBasic.FileGet(1, input, 1)

    Debug.WriteLine("A = " & input.A & "; B = " & input.B)

    FileClose(1)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!