none
Manipilate resources in vb.net RRS feed

  • Question

  • Hi

    I have 3 txt files in my resources.I load them into an array using threads.My problem is that users want to add data to the txt file at run time.

    Can i append the text file and save it back to my resources? how can I do that?

    Thursday, July 18, 2013 3:07 PM

Answers

  • I'm fairly certain that the answer is no. I don't see how it could do that because it's compiled along with the code.

    Please call me Frank :)

    Thursday, July 18, 2013 3:09 PM
  • The answer is no, resources are not read/write. The best method is to a) include the physical files in a known path i.e. the same folder as your executable or better yet one folder level down i.e. TextFiles for example b) extract files from resources into one of the folder already mentioned c) create the file when needed. There is another options to place the files in the local apps folder but I would in this case advise against this if the users need to gain access these files outside the application.



    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

    Thursday, July 18, 2013 4:43 PM
    Moderator

All replies

  • I'm fairly certain that the answer is no. I don't see how it could do that because it's compiled along with the code.

    Please call me Frank :)

    Thursday, July 18, 2013 3:09 PM
  • The answer is no, resources are not read/write. The best method is to a) include the physical files in a known path i.e. the same folder as your executable or better yet one folder level down i.e. TextFiles for example b) extract files from resources into one of the folder already mentioned c) create the file when needed. There is another options to place the files in the local apps folder but I would in this case advise against this if the users need to gain access these files outside the application.



    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

    Thursday, July 18, 2013 4:43 PM
    Moderator
  • answered
    Friday, November 22, 2019 9:49 AM