Get Embedded Resource as String
Here is a utility method for returning any embedded resource content as a string:
public static partial class Tools
{
public static string GetEmbeddedContent(string resourceName)
{
Stream resourceStream =
Assembly.GetAssembly(typeof(Tools))
.GetManifestResourceStream(resourceName);
string content = null;
using (StreamReader reader =
new StreamReader(resourceStream))
{
content = reader.ReadToEnd();
}
return content;
}
}