c# - How to properly embed settings file -
i have settings.settings file contains number of different endpoints in it. want embed file .dll file users cannot view or modify endpoints.
under build action
option settings.settings file see embedded resource
. read through msdn page here, i'm still not entirely sure option want.
can confirm want to, , if not, option should select?
i use embedded build action storing word doc template, don't see why couldn't use else such xml file contains settings. set build action embedded , can reference such:
var template = "filename.xml" // <-- file mark embedded assembly loader = assembly.getexecutingassembly(); var rawstream = loader.getmanifestresourcestream(template); byte[] bytearray = rawstream.readtoend();
you need using statement:
using system.reflection;
Comments
Post a Comment