public string GetFileContents(string resName)
string contents = "";
Assembly thisAssembly = Assembly.GetCallingAssembly();
// Read the file from the resource stream
if (resStream != null)
StreamReader reader = new StreamReader(resStream);
contents = reader.ReadToEnd();
The advantage is that the text files aren't even visible to the user, let alone tamperable. The disadvantages are that they are read only, so not appropriate for user settings, and that any changes require a rebuild and deployement. Therefore, appropriate in some cases, but not in others.