Search code examples
c#embedded-resource

Making an embedded file not readable in notepad


I'm working on .NET app with C# and Visual Studio, I'm embedding two .txt files to import data and that works. I noted although that if I open the .exe with Notepad I can freely read the content of the .txt files inside the whole text. Do you know a way to prevent this? I know if you're enough informed you can just open the code of the program, but I just want this to not be readable this easy and still have it as embedded resource.


Solution

  • I would suggest you encoding them with base64 which will make it less visible, if that works for you. As you already mentioned though, you can not totally prevent it - only make it harder.