Categories > Coding > C# >

have error in c# in resource

Posts: 1

Threads: 1

Joined: Dec, 2023

Reputation: 0


I want to put the programs for the application in the resource so that they do not take up space in the files. When I add them and make them extract to a specific place on the computer, this error appears. I want a solution.

  • 0

Posts: 28

Threads: 7

Joined: Dec, 2020

Reputation: 0


I presume your adding them to the Resx file. In such case you can easily manipulate it. One of my projects does this.

 var resource = Properties.Resources.requiredfile;
 FileStream fileStream = new FileStream("My cool file.txt", FileMode.CreateNew);
 for (int i = 0; i < resource.Length; i++)

this code assumes the file is stored under the name "requiredfile" and that you want to save it to "My cool file.txt"

  • 0

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )