Using a .txt file Resource in VB

后端 未结 3 1493
野趣味
野趣味 2020-12-10 18:42

Right now i have a line of code, in vb, that calls a text file, like this:

Dim fileReader As String
    fileReader = My.Computer.FileSystem.ReadAllText(\"dat         


        
3条回答
  •  南笙
    南笙 (楼主)
    2020-12-10 19:08

    If you added the file as a resource in the Project + Properties, Resources tab, you'll get its content by using My.Resources:

    Dim content As String = My.Resources.data5
    

    Click the arrow on the Add Resource button and select Add Existing File, select your data5.txt file.

提交回复
热议问题