Answers for "read embedded resource c# xml"

C#
0

read embedded resource c# xml

public string GetResourceTextFile(string filename)
{
    string result = string.Empty;

    using (Stream stream = this.GetType().Assembly.
               GetManifestResourceStream("assembly.folder."+filename))
    {
        using (StreamReader sr = new StreamReader(stream))
        {
            result = sr.ReadToEnd();
        }
    }
    return result;
}
Posted by: Guest on May-22-2020

C# Answers by Framework

Browse Popular Code Answers by Language