Think about it, there is no miracle. You want to take data from a file and put its contents inside your code. In the end this data is still saved somewhere - in your sources or binaries. So, why care?
Add this file to the project, mark to always copy the file in builds and tap forward to the solution. Now, if you really want to do this:
Read the file data, create a buffer and then create this buffer as C code#.
var buffer = File.ReadAllBytes(caminhoDoArquivoBinario);
System.Diagnostics.Debugger.Break(); // breakpoint após a leitura do buffer
Go then on Imediate Window
and make:
buffer <ENTER>
Copy what was generated and paste into a file .cs
.
Welcome to SP. Post the code you have already done and show where the problem/difficulty is occurring.
– Thiago Lunardi
Thanks for the welcome :D, the code I did is just pass the file to an array of bytes and vice versa (array of bytes -> *.exe), but as I explained, I want to break the dependency of the original file, I want to have it "hardcoded" in my code for me to build it from scratch when it’s convenient, I just can’t think of how to save this array of bytes to use in new instances of the application, you know how to do this?
– Wesley Nascimento
Who has denied, by kindness, pronounce.
– Thiago Lunardi